Run Lisp on Multiple Drawings

Run Lisp on Multiple Drawings

Travis.Biddle
Advocate Advocate
3,252 Views
25 Replies
Message 1 of 26

Run Lisp on Multiple Drawings

Travis.Biddle
Advocate
Advocate
I want to run a certain lisp (importmb.lsp) on multiple drawings (hundreds of drawings at times). I have downloaded ScriptPro as this seemed to be what I needed, but I can not figure out how to get it to run the lisp through script. Based on research, this is what my script file is, which I assume is the problem. (load "C:\\support\\importmb.lsp") importmb quit y I load the script into ScriptPro, select which drawings I want to run it on, it opens AutoCAD, but then nothing happens. Any help will be greatly appreciated.
0 Likes
3,253 Views
25 Replies
Replies (25)
Message 21 of 26

chris_lee_3
Enthusiast
Enthusiast
yes you should have a qsave and a close at the end.
(command "_qsave")
(command "_close")

0 Likes
Message 22 of 26

maratovich
Advisor
Advisor

 

Try using this -  AutoRunLisp 

 

Maybe this will help you.

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 23 of 26

chris_lee_3
Enthusiast
Enthusiast

I Played around a bit with scriptwriter today.
As a test I copied the script directly from the website “_.open *file* _.circle 0,0,0 5 _.save _Y _.close ” it worked fine, all the drawings on my desktop now have circles at 0,0.
Tried it again substituting, “zoom e “ for just this part “circle 0,0,0 5 “ and it worked.
I suspect the script can not have close in it.

0 Likes
Message 24 of 26

Sea-Haven
Mentor
Mentor

Depending on what you have done both Close and Close Y are valid more than likely needs the Y.

0 Likes
Message 25 of 26

john.uhden
Mentor
Mentor

I've never used ScriptPro, but what I see is that your code is only defining an AutoLisp command function.  This will not automatically run itself, so perhaps you have to add to your script (C:<I forgot its name>).

John F. Uhden

0 Likes
Message 26 of 26

Sea-Haven
Mentor
Mentor

He is loading then running lisp defun "importmb"

 

 (load "C:\\support\\importmb.lsp") importmb quit y

 

as you say maybe 

(load "C:\\support\\importmb.lsp") (c:importmb) quit y

 

So some other problem.

0 Likes