TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hudster on June 21, 2004, 11:05:22 AM

Title: Layer Help
Post 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.
Title: Layer Help
Post by: Jeff_M on June 21, 2004, 11:19:13 AM
I think it would be easier to add a check for the layers' existence and skip it if it is.

Jeff
Title: Layer Help
Post by: CAB on June 21, 2004, 11:54:21 AM
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:

Code: [Select]
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
Title: Layer Help
Post by: JohnK on June 21, 2004, 01:14:33 PM
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.