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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running macros from ACAD startup..

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hi peeps,

Does anyone know how to run a VBA macro from start-up? The help menu says about writing it to the Acad.lsp file but I can't find it, and if it doesn't exist, I've never used lisp before to be able to create one.
Here's exactly what the help menu suggests:

You can automatically run any macro in the acad.dvb file by calling it with the command line version of VBARUN from an AutoCAD startup facility like acad.lsp. For example, to automatically run the macro named drawline, first save the drawline macro in the acad.dvb file. Next, invoke notepad.exe and create (or append to) acad.lsp the following lines:

Code:
(defun S::STARTUP()
     (command "_-vbarun" "drawline")

)

So if I do this and save it as acad.lsp, where do I need to save it to?

I've already made a 'call' from the acad.dvb file but I need to initialise the acad.lsp file to run the program/macro when AutoCAD starts up..

Thanks in advance..

Renegade..
 
You can do a search for it or it may be something like ACAD2000.lsp or such. It depends which version you are running. You can even create new one and save it under a pathed directory (one that ACAD searches).

BU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top