Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running AutoLISP in multiple drawings?

Status
Not open for further replies.

kypper

Technical User
Jul 19, 2001
5
US
Is there a way to run an AutoLISP program in multiple drawings using AutoCAD 2000? Example: Open one drawing up, run the AutoLISP program, close the drawing, open the next drawing, run LISP, close drawing and so on for an entire folder. Can this be done with a script?

Thanks,
Jason
 
Hi,
There are numerous script programs for AutoCAD and you can create your own also. The main premise is to write the script with the format:

_open
"C:/someDrawing.dwg"
_.redraw
(load "c:/someLISPprogram.lsp")
(someLISPprogram)
_.qsave
_.close
_y
_open
"C:/someOtherDrawing.dwg"
_.redraw
(load "c:/someLISPprogram.lsp")
(someLISPprogram)
_.qsave
_.close
_y

Then run the script from inside AutoCAD. The above file needs a .SCR extension. I hope this helps.

BU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top