YZ Posted November 26, 2015 Share Posted November 26, 2015 Any ideas why this works: SetEnv;TextUnderLine;'spacetrans;0.776; Command: SetEnvEnter variable name: TextUnderLine Value : 'spacetrans >>Specify paper space distance : 0.776 Resuming SETENV command. Value : 0.011768835644541 but this doesn't: SetEnv;TextUnderLine;'spacetrans;0.776;UCS;Object;Last; Command: SetEnvEnter variable name: TextUnderLine Value : 'spacetrans >>Specify paper space distance : 0.776 Resuming SETENV command. Value : UCS It works perfectly when it is the last command in a macro. But as soon as I try to continue the macro, the spacetrans is ignored as if it were a standalone query, and the next command is entered as the value of the SetEnv. Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 26, 2015 Share Posted November 26, 2015 I can only offer a guess, in my experience other transparent commands behave the same, my guess is that calling a transparent command internally calls up a sort of subroutine, and that action causes the macro to stop at that point. I would love to find a solution, for me the problem is the 'cal command, so I hope someone else has more insight. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 26, 2015 Share Posted November 26, 2015 "Resuming SETENV command" Looks like you need an extra return to exit setenv Snuck in Steven Quote Link to comment Share on other sites More sharing options...
steven-g Posted November 26, 2015 Share Posted November 26, 2015 BIGAL could be. I haven't actually figured out yet what 'spacetrans does, its a new command for me. Anyways I have a slight revision to my answer above, I checked back to the problem I have with 'cal and what actually happens is that the results don't actually come back until after the macro finishes, so where you expect the results in the middle of a macro it doesn't happen, and therefore mucks up the order of things. Quote Link to comment Share on other sites More sharing options...
YZ Posted December 1, 2015 Author Share Posted December 1, 2015 BIGAL could be. I haven't actually figured out yet what 'spacetrans does, its a new command for me. Anyways I have a slight revision to my answer above, I checked back to the problem I have with 'cal and what actually happens is that the results don't actually come back until after the macro finishes, so where you expect the results in the middle of a macro it doesn't happen, and therefore mucks up the order of things. Yeah that is what I observe. It works in command line, but sometimes the results are not available immediately. Steven do you mostly find it with diesel? ('spacetrans is very similar to 'cal, but it calculates the difference between papaerspace and your viewport, to return the value you'd have to draw a line at in your model space to appear in paperspace the length you specified.) Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 1, 2015 Share Posted December 1, 2015 Steven do you mostly find it with diesel? Yup, probably because diesel sends the macro off to the diesel interpreter, and everything works differently there. At least in diesel you can to some extents control the program sequence by using brackets (but that is a whole other story of frustration) I have in the past had to use 2 or more macro's or scripts to get the results I want, and haven't managed yet to find a way to get around that (even calling 2 scripts from within a single macro results in the same odd behaviour) Quote Link to comment Share on other sites More sharing options...
steven-g Posted December 1, 2015 Share Posted December 1, 2015 Without seeing the rest of your macro, would it not be possible to rearrange the macro, so you change the UCS first and then set the value of TextUnderLine as the last command. Quote Link to comment Share on other sites More sharing options...
YZ Posted December 15, 2015 Author Share Posted December 15, 2015 No, the macro will be longer than just this. I want to use the value as the displacement of a move command. I have created the spacetrans result using a diesel calculation: ^C^CSetEnv;TextUnderLine;$M=$(/,0.8,$(GetVar,CANNOSCALEVALUE)); Having better success with that now. Quote Link to comment Share on other sites More sharing options...
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.