TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hudster on June 21, 2004, 11:05:22 AM
-
How do i save the layer states, prior to thawing all layers, using a lisp?
I'm trying to write a lisp to create all our standard layers, but if one is already made and frozen, the lisp falls down, so I want to save the states, thaw everything add the layers and then return the layers to their previous states.
thanks in advance for any help.
-
I think it would be easier to add a check for the layers' existence and skip it if it is.
Jeff
-
I think Jeff's approach is a good one.
You could thaw that the layer revise it to company standards then freeze it back.
It might be easer to suggest a fix if you posted the code or just that section
of code.
I might approach it like this:
pseudo code
setq locked nil frozen nil
if (layer locked) -- setq locked T
Unlock layer
if (layer frozen) -- setq frozen T
Thaw layer
Change layer as needed
if locked --> lock layer
if frozen --> freeze layer
-
yep agreed.
Hudster, i, Mark & Daron have writen several rotines you might be intrested in. I think mark had a Layer state tester, Daron had a Frozen layer collector and i had a ...well i prolly did something stupid like a "tblsearch" and added a few worthless lines in there to make it look fancy :P , but i would do some searching around and see what you come up with.