Jump to content

Recommended Posts

Posted

I ran a file that had been written by a few of you recently and it worked great

http://www.cadtutor.net/forum/showthread.php?56084-Layerstate-applied-via-lisp

 

I think that its because the layerstate has already been imported. I have saved over the original layerstate and tried to re run it but get NIL. I think its because its already in the layerstate manager it wont reimport.

 

i thought i could write the code like this

(if (layerstate-delete "ELLS" nil)
(layerstate-import "I:\\DRAWINGS\\090-0056 LFMP\\Common\\Layer_States\\ELLS.las")
(layerstate-restore "ELLS" nil)
)
_QSAVE
_close

but still no luck.. any ideas other then rewriting the lisp? and re saving the layerstate with a different name.

 

Maybe theirs a way to delete all layerstates in a drawing i am unaware with?

Posted

Hi, your post had probably gone by the wayside because of the site going off-line.

 

Anyhow, what about checking if the layer state already exists. If it does, then delete it. After which the import should work fine.

(if (layerstate-has "ELLS") (layerstate-delete "ELLS"))
;; continue with the usual codes from the other thread.

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