econnerly Posted January 11, 2017 Posted January 11, 2017 I used to have this really handy lisp but have switched companies and forgot to bring it with me. The command was LPO and it would turn every off layer on, even xref, and I would be able to individually click the layers that I wanted to remain on. After clicking enter, the other layers would return to the off state. One of the most useful routines I have ever seen. I have very basic knowledge of lisp around would really appreciate some help. I also did a search and couldn't find anything similar. Thanks in advanced. Quote
Grrr Posted January 11, 2017 Posted January 11, 2017 Sounds like Kent Kooper's Layer Isolate/Unisolate. But I'm not sure does it work with xrefs. Quote
econnerly Posted January 11, 2017 Author Posted January 11, 2017 Sounds like Kent Kooper's Layer Isolate/Unisolate. But I'm not sure does it work with xrefs. It was actually sort of the reverse of that. I happen to have an old gif of the command. http://i.imgur.com/8z32cUr.gifv Quote
econnerly Posted January 11, 2017 Author Posted January 11, 2017 You would issue the command and it would turn everything that's "off" to "on". Then you could select individual layers with your mouse that would stay "on". The rest of the original off layers would return to the "off" state. Quote
BIGAL Posted January 12, 2017 Posted January 12, 2017 If you look at this snippet of code it shows the layer details, no code at this stage someone may have something not a hard task why not have a go yourself. (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq alllayers (vla-get-layers doc)) (vlax-for lay alllayers (vlax-dump-object lay) ) Look at the dump you will see the on/off freez/thaw switches so a list can be made of existing condition. ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing ; Property values: ; Description = "" ; Freeze = 0 ; LayerOn = -1 ; Linetype = "Continuous" ; Lineweight = -3 ; Lock = 0 ; Material = "Global" ; Name = "0" ; PlotStyleName = "Color_7" ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing ; Property values: ; Description = "" ; Freeze = -1 ; LayerOn = -1 ; Linetype = "Continuous" ; Lineweight = -3 ; Lock = 0 ; Material = "Global" ; Name = "alan1freeze" ; PlotStyleName = "Color_7" ; Plottable = -1 ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing ; Property values: ; Description = "" ; Freeze = 0 ; LayerOn = 0 ; Linetype = "Continuous" ; Lineweight = -3 ; Lock = 0 ; Material = "Global" ; Name = "alan2off" Quote
econnerly Posted January 12, 2017 Author Posted January 12, 2017 I wish my knowlage of lisp was as great as most others on this board. This is making me dizzy. If you look at this snippet of code it shows the layer details, no code at this stage someone may have something not a hard task why not have a go yourself. (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq alllayers (vla-get-layers doc)) (vlax-for lay alllayers (vlax-dump-object lay) ) Look at the dump you will see the on/off freez/thaw switches so a list can be made of existing condition. ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing ; Property values: ; Description = "" ; Freeze = 0 ; LayerOn = -1 ; Linetype = "Continuous" ; Lineweight = -3 ; Lock = 0 ; Material = "Global" ; Name = "0" ; PlotStyleName = "Color_7" ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing ; Property values: ; Description = "" ; Freeze = -1 ; LayerOn = -1 ; Linetype = "Continuous" ; Lineweight = -3 ; Lock = 0 ; Material = "Global" ; Name = "alan1freeze" ; PlotStyleName = "Color_7" ; Plottable = -1 ; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing ; Property values: ; Description = "" ; Freeze = 0 ; LayerOn = 0 ; Linetype = "Continuous" ; Lineweight = -3 ; Lock = 0 ; Material = "Global" ; Name = "alan2off" Quote
BIGAL Posted January 13, 2017 Posted January 13, 2017 I am sure there is a lisp "save current layer settings" something I dont have. Next step is to reset the Freeze & Layeron settings do your bit then reset layers back to the way they were. Maybe on the week end I will have time Quote
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.