Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unlock ALL layers

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Anonymous
25115 Views, 10 Replies

Unlock ALL layers

Anyone have a code that will unlock ALL layers. Similar to the thaw or turn on ALL layers buttons?

I'm running a full version of 2011.

 

Thanks,

Dave Fox

10 REPLIES 10
Message 2 of 11
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

Anyone have a code that will unlock ALL layers. Similar to the thaw or turn on ALL layers buttons?

I'm running a full version of 2011.

 

Thanks,

Dave Fox


I don't have 2011, but I imagine the contents of those buttons is probably something like this:

 

^C^C_.-layer _thaw * ;

^C^C_.-layer _on * ;

 

[They may or may not have the _ or . prefixes on things, and they're not case-sensitive.]  If so, you could make one like this:

 

^C^C_.layer _unlock * ;

 

If such button macro things are still similarly structured, right-click on one of those Thaw-All or On-All buttons, and pick Customize... at the bottom of the list.  Then with the Customize window up, click again on the button, and what it invokes will be in the "Macro associated with this button:" area.  Copy that, change the _thaw or _t or _on or whatever to _unlock or just _u, and assign the adjusted line to a new button.  On the Commands tab in the Customize window, pick User defined, and in the right area, grab User Defined Button and drag it into a Toolbar.  Then pick on that new space and you can paste the code in, give it a name and description, edit the button appearance, etc.

Kent Cooper, AIA
Message 3 of 11
Anonymous
in reply to: Anonymous

Here is what 2011 says for the Thaw all layers ^C^C_laythw. Now there is a button that will unlock the selected layer and that is ^C^C_layulk, but that doesn't unlock all layers. It will only allow you to unlock 1 at a time.

Message 4 of 11
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

Here is what 2011 says for the Thaw all layers ^C^C_laythw. Now there is a button that will unlock the selected layer and that is ^C^C_layulk, but that doesn't unlock all layers. It will only allow you to unlock 1 at a time.


So there are "specialized" Thawing and On-ing command names for doing all Layers [they're in the Express Tools for me back in 2004, but I don't have toolbar buttons for them, so I forgot they were there -- I've had equivalents in pull-down and tablet menus since long before they existed as Express Tools].  It seems the equivalent ones for Off and Freeze and Lock, like that for Unlock, also work by user selection, one at a time, rather than doing all Layers.  The difference would be that for a Layer the User wants turned On or Thawed, they can't select an object, because objects on such a Layer won't be visible to select, so the commands do all Layers for those two options.

 

For what you want, you'll need to use the generic Layer command and its Unlock option, with the asterisk representing all Layers:

 

^C^C_.-layer _unlock * ;

 

[You could make similar do-it-to-all-Layers buttons for the Off and Freeze and Lock options, but those would not be things I would expect anyone to have any use for.]

Kent Cooper, AIA
Message 5 of 11
Anonymous
in reply to: Anonymous

Enter name list of layer(s) to unlock or <select objects>: * Enter an option
[?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Fre
eze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:

This is what I get.

OK here's the weird thing. It works, but I hit the icon, it shows the above, I select "U", it says "Layer, Layer Unlock GROUP" ,then displays the default "Command:" on the command line, but the layers are not unlocked until I hit the icon again. Also if I select any of the other options (LO for lock) it takes me to the standard command as if I entered LO in the deafult command line. Same with TR, T, D, etc. A minor inconveinence. Any ideas as to why?

 

Here's another glitch. If I execute the command and select L the line command comes up. I draw a line and all of my layers are unlocked.

Message 6 of 11
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

Enter name list of layer(s) to unlock or <select objects>: * Enter an option
[?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Fre
eze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:

This is what I get.

OK here's the weird thing. It works, but I hit the icon, it shows the above, I select "U", it says "Layer, Layer Unlock GROUP" ,then displays the default "Command:" on the command line, but the layers are not unlocked until I hit the icon again. Also if I select any of the other options (LO for lock) it takes me to the standard command as if I entered LO in the deafult command line. Same with TR, T, D, etc. A minor inconveinence. Any ideas as to why?

 

Here's another glitch. If I execute the command and select L the line command comes up. I draw a line and all of my layers are unlocked.


Does it really not return you to the Command: prompt [at the point where you have "This is what I get"], the first time?  And does it really not unlock Layers?  [It works for me, copied/pasted right from Message 4 into a new user-defined button.]

 

It looks like the "U" you give it is being taken as undo, not as the Unlock option in Layer, because that business with GROUP at the end is just what I would expect from undoing a menu item.  But that would only happen on entering U at the Command: prompt, even if somehow that's not actually appearing for you.  [That would also explain why you get the Line command if you give it "L" -- it would require the Command: prompt to be waiting there, whether seen or unseen.]  And if that's the case, of course the Layers would no longer be unlocked if you undo the menu item, but were they unlocked by the button?  Pick the button and immediately check the Layer listing without giving it a "U" [or anything else], to see whether they've actually been unlocked. 

One possibility:  check the "Macro associated with this button:" area in Customize for that button, and make sure the semicolon is really the last thing in there, that is, it doesn't have any additional space(s) or Enter(s) somehow pasted in that you can't see, going past the semicolon or on to another line.  Unlike the way it works in Lisp, in a macro every character counts and is processed, including spaces.

Kent Cooper, AIA
Message 7 of 11
Anonymous
in reply to: Anonymous

You are correct. Once I hit the button all layers are unlocked.

Message 8 of 11
Anonymous
in reply to: Anonymous

to unlock all layers at once. Not one at a time but ALL LAYERS AT ONCE.

  • open the layer properties table or type LAYER. then enter
  • inside the layer properties table, highlight all the layers OR click on one layer and press CTRL A to highlight all at once.
  • then click on one unlock icon AND EVERYTHING UNLOCKS
  • works for LOCK, FREEZE and LAYER ON.
  • Good Luck.

 

Message 9 of 11
pbejse
in reply to: Anonymous


@Anonymous wrote:

to unlock all layers at once. Not one at a time but ALL LAYERS AT ONCE.

  • open the layer properties table or type LAYER. then enter
  • inside the layer properties table, highlight all the layers OR click on one layer and press CTRL A to highlight all at once.
  • then click on one unlock icon AND EVERYTHING UNLOCKS
  • works for LOCK, FREEZE and LAYER ON.
  • Good Luck.

 


Is there a question there? 

Message 10 of 11
Anonymous
in reply to: Anonymous

Thanks a lot i saw your post and its so useful because i was suffered from this issue
Mushtaq Land Surveyor
Message 11 of 11
Anonymous
in reply to: Anonymous

HI Bro, am using artcam premium 2017 and delcam artcam standard 2012 but both have a default layer wc is active, do u have a solution for the packages , i cannot make multipel layers for projects i want to work on thx hope to hear from u soon . How to unlock those layers Email mulindwadaglous@gmail.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report