Jump to content

'spacetrans works until I put more commands after it


Recommended Posts

Any ideas why this works:

 

SetEnv;TextUnderLine;'spacetrans;0.776;

Command: SetEnv

Enter 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: SetEnv

Enter 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...