Jump to content

Temp Hold Layer State


Cylis0509

Recommended Posts

Hi Everyone,

 

Is it possible to temporarily hold a layer state in memory and then restore it?

 

I am working on a drawing cleanup LiSP and part of what it does is bind xrefs and then clean up the layer names (removing XREFNAME$|$) and merging layer names together when they exist in the xref and the current drawing.

 

The issue is that if a layer with the same name was off in the xref but on in the current drawing, it then becomes on when it should be off. (I hope that makes sense)

 

Is there a way to save the state of the xrefs and then restore to the current drawing with out have to write to a file? This will be part of a larger LiSP where I will take the layerstate at the beginning and the last I do is restore the layer state at the end.

 

Thank you

Link to comment
Share on other sites

I think you have answered your own question you must write a list of layer states to some where you could do just that make a list which will stay in memory I would do pairs ("layer1" 1 "layer2" 0 "layer3" 3 .. 0 off, 1 0n, 3 frozen etc a pretty simple repeat looking at nth x & nth (1+ x)

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