JerryFiedler Posted April 30, 2021 Posted April 30, 2021 I have the following code in a command button. It does what I want it to except it is not perfect. It is driving me crazy but that is a short trip for me! I would like the macro to zoom into the specified window and then open the editing dialog box. What it actually does is open the editing dialog box and after I enter a key stroke in one of the text fields it zooms to my window. This is okay but why does it not zoom first? ^C^C^Q(command "zoom" "w" '(-1.0 3.0 0.0) '(9.0 -0.5 0.0))(command "eattedit" (ssget "_C" '(7.0 0.14) '(6.0 1.0))) 1 Quote
BIGAL Posted April 30, 2021 Posted April 30, 2021 I put a block at 0,0 for testing. Note the space as last character tested on command line but should work in a menu, I have always used ^P not Q. ^C^C^Pzoom w 2,2 -2,-2 eattedit 0,0 1 1 Quote
JerryFiedler Posted May 1, 2021 Author Posted May 1, 2021 BigAl, Thank you very much. I did not know you could select a block using the insertion point. I learn something new every time I come to this site. ^C^C^Pzoom w -1.0,3.0 9.0,-0.5 eattedit -0.182317,-0.125292 This works EXACTLY as desired. Although I still wonder why using (command ...) (command ...) didn't execute the first command until I hit the space bar in the text editor while the second command was executing. Life is full of mystery. Quote
steven-g Posted May 1, 2021 Posted May 1, 2021 Purely a guess here, you are using a Lisp call. I use LT so I cannot reproduce that, but I do know that when you start a macro using Diesel there are no system changes (things like variables don't update ) until the macro has completed and the Diesel interpreter is closed returning control to the program. You are opening the eattedit within the 'Macro' environment probably with a similar Lisp interpreter or whatever the equivalent is. So nothing updates until the macro has reached the final Lisp bracket and it hangs within the Macro environment until you actually input something. 1 Quote
JerryFiedler Posted May 1, 2021 Author Posted May 1, 2021 Steven, Before BigAl gave me a working solution I noticed that the zoom command would execute only if I typed a "space" in the editor text field. The editor would keep on working but the zoom would happen. I figured the (command zoom...) was waiting for a space but no matter where I placed a space (also tried semi-colon and " ") the macro did not work as planned. It doesn't really matter now that the command button is working. Thanks for your comments. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.