Author Topic: Layer Help  (Read 2432 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Layer Help
« 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.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Layer Help
« Reply #1 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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Layer Help
« Reply #2 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
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Layer Help
« Reply #3 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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org