jtk07 Posted January 26, 2011 Posted January 26, 2011 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? Quote
irneb Posted February 2, 2011 Posted February 2, 2011 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. Quote
Recommended Posts
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.