Jump to content

Freeze all but one Layer


hyposmurf

Recommended Posts

This a handy new lisp I've found :) .It will freeze all your layers except the one that is current.Useful if you want to work on one layer while in a complex drawing.

 

(defun c:ao ()

(setvar "expert" 0)

(command "layer" "off" "*" "" "" "")

)

For anyone unsure of how to save and load a lisp here you go:

Save of Copy this file into a notepad file and save it with a file extension .lsp then load the lisp via the "appload" command.In appload find the file and then press load.You can add this to your startup suite by clicking on the "contents" feature,select "add" then all you need to load the lisp each time you require it is add "ao" to the command line

Link to comment
Share on other sites

Hyposmurf

runing this routine the EXPERT system variable remains set to 0. This may couse confusion for beginer users, data lose and other lisp routines can be affected.

Please let me propose a better version of your routine: save the EXPERT variable before to change it and restore it at the end.

(defun c:ao () 
(setq old (getvar "expert"))  ;save the value of EXPERT
(setvar "expert" 0) 
(command "layer" "off" "*" "" "" "")
(setvar "expert" old)   ;Restore the old value
)

Link to comment
Share on other sites

This a handy new lisp I've found :) .It will freeze all your layers except the one that is current.Useful if you want to work on one layer while in a complex drawing.

 

(defun c:ao ()

(setvar "expert" 0)

(command "layer" "off" "*" "" "" "")

)

For anyone unsure of how to save and load a lisp here you go:

Save of Copy this file into a notepad file and save it with a file extension .lsp then load the lisp via the "appload" command.In appload find the file and then press load.You can add this to your startup suite by clicking on the "contents" feature,select "add" then all you need to load the lisp each time you require it is add "ao" to the command line

 

Not trying to rain on your parade and that lisp is very cool but....express tools has had something like this for a while. It is called Isolate Object's Layer. Only difference is that it does not freeze the layers it turns them off. I like this because when I am finished editing on that one layer it is easy to get my drawing back like I had it. I simply turn on all the layers and the ones I had frozen are still that way but yours is still pretty cool :)

 

F7

Link to comment
Share on other sites

Yes there is!In CAD 2K you do the following :

Select from the express/layers menu the following "layer isolate" or enter LAYISO,then select your layer to isolate.To return to your original configuration of frozen and thawed layers select "layer unisolate" from the express/layers menu or enter LAYUNISO.Thanks for that didnt realise before :) ,now I can go and make a some menu buttons for these handy commands.Thats also good that it doesnt alter your original layer configuration.

Link to comment
Share on other sites

  • 8 years later...

I have a situation frustrating me. I have alwasy been able to go to Layer Properties, right click a layer, then from the menu select "Isolate Selected Layer"... but now I am on C3D 2011 and that option is now greyed out! I cannot seem to find a solution. Anyone have an idea as how to restore this option? I have been ACADing for 5 years, started with ACAD 2000...

Link to comment
Share on other sites

You should use full command names instead of an alias. You never know when you might change LL to be something else or AutoCAD assigns that syntax to another command name. For instance, in Civil 3D, "LL" is a command that converts Lat/Long to an XYZ point and it's NOT defined in the PGP file - cannot be defined as anything else.

Link to comment
Share on other sites

Thanks for the suggestions. I certainly can work around getting the layers to freeze in various ways, my main question I guess was if anyone knows how to get the option on the menu un-greyed and available again... co-workers here have it as an available option... I was thinking maybe I had a variable turned off or something.

 

menu.jpg

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