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

Macro or command to reload a lisp?

4 REPLIES 4
Reply
Message 1 of 5
jarredmonday
2058 Views, 4 Replies

Macro or command to reload a lisp?

Hello,

I've been searching for what I am trying to do, but I am only getting close but not what I am needing.

 

I looking to have a button on our toolbar that simply (re)Loads a current lisp without having to browse for the lisp.

 

I work with a few...quote, "I hate computers and change" people and I have a hard time asking them to either restart autocad or to use the Command: APPLOAD to update this lisp.

 

It doesn't matter which direction this goes, as long as, I can have a one click end result. 

 

Any suggestiong is greatly appreciated.

Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
4 REPLIES 4
Message 2 of 5
gccdaemon
in reply to: jarredmonday

Here is what I do. I set everyones computers to load acad.lsp with every drawing under the system tab of the properties dialogue box. Then I attach a single company.lsp file to the custom toolbar.cuix (which is loaded as the enterprise.cuix). Any time they close the drawing and repoen it, it should reload the company.lsp. This way I update the lisp and they don't even have to bother with appload.

Andrew Ingram
Civil 3D x64 2019
Win 10 x64 Pro
Intel Xeon E5-1620
32 GB Ram
Message 3 of 5
smaher12
in reply to: jarredmonday

This is what I use for my buttons. Do forget to add the Support File Search Path path under Options. 

 

^C^C(IF (NOT C:NAMEHERE) (LOAD "NAMEHERE")) NAMEHERE

Message 4 of 5
BlackBox_
in reply to: smaher12


@smaher12 wrote:

This is what I use for my buttons. Do forget to add the Support File Search Path path under Options. 

 

^C^C(IF (NOT C:NAMEHERE) (LOAD "NAMEHERE")) NAMEHERE


Unfortunately, that macro demand-loads the LISP (which I use often myself, and find to be very useful), however that does not reload the LISP as the OP has requested above.

 

For that, simply call the LOAD function in your macro instead:

 

^C^C(LOAD "NAMEHERE" "ONFAILURE")) NAMEHERE

 

 

HTH



"How we think determines what we do, and what we do determines what we get."

Message 5 of 5
scot-65
in reply to: jarredmonday


@jarredmonday wrote:

Hello,

I've been searching for what I am trying to do, but I am only getting close but not what I am needing.

 

I looking to have a button on our toolbar that simply (re)Loads a current lisp without having to browse for the lisp.

 

I work with a few...quote, "I hate computers and change" people and I have a hard time asking them to either restart autocad or to use the Command: APPLOAD to update this lisp.

 

It doesn't matter which direction this goes, as long as, I can have a one click end result. 

 

Any suggestiong is greatly appreciated.


OK, still yet another strategy (that does not involve a single click):

 

Background:

We have a local "Utility" file that declares all our custom commands.

All of our stand-alone custom routines resides in a unique local folder, which has a support path declaration.

This Utility file is loaded via acad.lsp (or similar) and the contents inside behaves similar to AUTOLOAD (do not "hard-path").

This Utility file is in a folder that has a support path declaration.

 

Now:

On your server, create a "Update" folder and populate that folder with all the revised stand-alone routines.

Declare a support path to this Update folder and place it in the first position of the support path list.

 

If you are adding new routines to your environment, you will need to edit the "Utility" file to look for

a "New_Utility" file on the server:

(if (findfile "New_Utility.lsp") (load "New_Utility") )

 

Down the road:

Copy over all items from the server to the local folder and replace the Utility file with a revised Utility file.

 


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