Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisp as button: autoloads on startup

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
414 Views, 2 Replies

Lisp as button: autoloads on startup

Hi

 

I have a small lisp-routine to save file to a new folder. My problem is when I add it to APPLOAD to be able to link it to a button in CUI, it allways runs the code automatically when I start ACAD. I only want to start the script when I press the button.

 

(defun c:savefile()
    (command "_saveas" "2013" (strcat "C:\\newfolder\\" (getvar "dwgname")))
    )
(savefile)

 

Where might I've gone wrong?

 

Thx!

Tags (1)
2 REPLIES 2
Message 2 of 3
M_Hensley
in reply to: Anonymous

Remove (savefile) from the end. That is what is causing it to execute.

Message 3 of 3
Anonymous
in reply to: M_Hensley

Ah of course! How could I miss that...

Many thanks!

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

Post to forums  

Autodesk Design & Make Report

”Boost