Lisp file
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Lisp file

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
psilzle
Guest





Posted: Tue May 24, 2005 4:10 pm    Post subject: Lisp file Reply with quote

I wrote a quick little script file to add some layers and set the color
to use on about 300 drawing we are converting over. There is a later
that I want to change its name and know how to do that with the script,
but the name is not always the same. It is BEND sometimes and BENDS
others. I can't do a logic test with a script and do not know lisp
well enough to use it. Also anyway to change all entities that are the
color white to layer 0?

Thanks,

Paul Silzle

Back to top
CarlB



Joined: 27 Sep 2005
Posts: 52

Posted: Wed Sep 28, 2005 10:50 pm    Post subject: re:Lisp file Reply with quote

You can use lisp in a script, but there can be problems with a script processing faster than the list statement/operation.
(if "tblsearch" "layer" "bend")(command "-rename" "LA" "bend" "somethingelse"))
(if "tblsearch" "layer" "bends")(command "-rename" "LA" "bends" "somethingelsealso"))

All items that are color white to layer 0 - not so easy. A lisp routine could select all objects that have their color set to white, and could select all items on layers that are set to white and are color "bylayer". Your script could run this lisp routine, then oerate on the selection set to change all to layer 0. or just have the lisp routine do that as well. ..or instead of a script convert it all to lisp. may not be as difficult as you think. Most Autocad commands can be replicated in lisp as follows;

(command "autocad command" "input 1" "input 2")

for example

(command "line" "0,0" "3,3" "")
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB