Adding a command at AutoCAD Startup

Adding a command at AutoCAD Startup

awadsworth8Q4WM
Explorer Explorer
1,542 Views
4 Replies
Message 1 of 5

Adding a command at AutoCAD Startup

awadsworth8Q4WM
Explorer
Explorer

I want to add a simple command at AutoCAD 2021 startup.  The command is (setvar "osnapz" 1).  Everything I read says to add the command to acaddoc.lsp but I cannot find this file in AutoCAD 2021.

Any Ideas,

Allen

0 Likes
1,543 Views
4 Replies
Replies (4)
Message 2 of 5

dlanorh
Advisor
Advisor

If you can't find it you can create it. Open notepad type in (setvar "osnapz" 1) then save as acaddoc.lsp, ensuring the file is in a directory in the autocad support path.

I am not one of the robots you're looking for

0 Likes
Message 3 of 5

O_Eckmann
Mentor
Mentor

Hi,

 

In my french version it is stored here : C:\Program Files\Autodesk\AutoCAD 2021\Support\fr-fr

and it's name is ACAD2021DOC.LSP

 

Olivier

Olivier Eckmann

EESignature

0 Likes
Message 4 of 5

cadffm
Consultant
Consultant

This is another file (check the filename) and not for personal use.

Acad.lsp for program start and acaddoc.lsp for (every) document start are not part of the install package, the user can create these files.

Inside a supportpath, acad will load them.

 

For OSNAPZ is acad.lsp the right place,

but also acaddoc.lsp works.

Sebastian

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

You can load your custom lisp on startup also using Appload and save in Start up Suite. We used this method for years rather than acad.lsp or acaddoc.lsp. The custom lisp can have lots of stuff in it.

0 Likes