Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

automatic load Lisp question

3 REPLIES 3
Reply
Message 1 of 4
joeman27
493 Views, 3 Replies

automatic load Lisp question

How do I have a .LSP file load automatically when I open autocad?

 

And how do I put .LSP files in the tool pallete?

 

Thanks~!

3 REPLIES 3
Message 2 of 4
Kent1Cooper
in reply to: joeman27


@joeman27 wrote:

How do I have a .LSP file load automatically when I open autocad?

....


Read up about the acad.lsp and acaddoc.lsp files in Help, and/or the Startup Suite in the APPLOAD dialog box.

Kent Cooper, AIA
Message 3 of 4
aqdam1978
in reply to: joeman27

Hi,

 

I assume that you want to made autoload mylisp.lsp (or .FAS) code:

so, via notepad creat a new text file and put this line in text file:

 

(LOAD "mylisp")

 

 

then save the file and rename it to: acaddoc.lsp

then move this file to SUPPORT folder or any other folder that you added in:

Tools/Options/Files/Support File Search Path

(your lisp code also should be in one of that folders too)

 

Now, your lisp program loaded in every drawings that you open it.

 

if you made acad.lsp then your program loaded just one time and not loaded in every drawing.

in this case if you want to load acad.lsp in every drawing you should "check" that option in:

Tools/Options/System/Load acad.lsp in every drawing

 

hope to help you

 

 

 

Message 4 of 4
scot-65
in reply to: joeman27


@joeman27 wrote:

How do I have a .LSP file load automatically when I open autocad?

 

And how do I put .LSP files in the tool pallete?

 

Thanks~!


Another option is to create a file called MyMenu.MNL where "MyMenu" is the same exact name

as the CUI that you are using (weather it is a main or enterprise menu). Place newly created file

in same folder as the CUI (CUIX) that you are using.

 

If your routines are in separate files:

(defun c:ABC () (load "ABC")(c:ABC)(princ) );brief description

[repeat for each stand-alone routine]

[declare support path to the folder containing the stand-alone routines -> OPTIONS command]

 

If you want to dump all your separate routines into this MNL file:

(defun c:DEF ()

 [program]

)

(defun c:GHJ ()

 [program]

)

 

It would be easier to create tool buttons or pull-downs of your routines instead of the tool pallete.

When migrating or transfering to other workstations, the tool pallete *may* not migrate.

 

If you have the keyboard command defined, it is very easy to create access points in the other

places mentioned above...

 

One can also look into using that clunky ribbon to declare your routines: ^C^CABC;

Begin by entering CUI at the command prompt, then create the command (bottom-left pane).

 

???


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost