Jump to content

Macro for switching back to previous layer in LT


Recommended Posts

Posted

I was wondering.....since LAYERP is unavailable in LT, is there an alternative macro string that can achieve the same thing?

Posted

How about Layer > Set? The macro could pause for user input.

Posted

tough one - I don't immediately see how you are going to accomplish this.

 

Even in LISP layerp functionality is hard to emulate.

Posted

this is completely proof of concept. i have zero experience writing macros for buttons and i've only had a reason to use diesel once. i have access to lisp, so i've had no reason to bother with it. however, i'm sure some LT/button macro guys should be able to correct this.

 

^C^Cai_molc;\setvar;USERI1;$M=$(getvar,clayer)

^C^C$M=$(setvar;clayer;$(getvar,USERI1))

^C^C-layer;t;$(getvar,USERI1);s;$(getvar,USERI1);;

 

the first is to select an object, set as current layer and store the current layer. the second or third (third might work better and will account for layer being frozen) will set the current layer as the last set current layer. now this will only work once, but it's the best i can think of.....at least it's something :(

Posted
tough one - I don't immediately see how you are going to accomplish this.

 

Yeah thanks Lee, I'm beginning to think I may be asking the impossible.

 

Alanjt:

 

Thanks for your input.

I've not used DIESEL before but have begun to read up on it, and will attempt to make some use of your suggestions, as I'm not quite ready to give up just yet!

 

I'm trying to make buttons for one click access to horizontal and vertical construction lines on the right layer (in this case the layer 'xline'). I can do that part, it would have just been nice to have it switch back to the previous layer once all construction lines were placed.

Posted
Yeah thanks Lee, I'm beginning to think I may be asking the impossible.

 

Alanjt:

 

Thanks for your input.

I've not used DIESEL before but have begun to read up on it, and will attempt to make some use of your suggestions, as I'm not quite ready to give up just yet!

 

I'm trying to make buttons for one click access to horizontal and vertical construction lines on the right layer (in this case the layer 'xline'). I can do that part, it would have just been nice to have it switch back to the previous layer once all construction lines were placed.

theoretically it should work, which is why i went ahead and posted it. it at least gives you a skeleton model.

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