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

Can't get my program to run

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
clippincott-CL
503 Views, 4 Replies

Can't get my program to run

I have very little experience with AutoLISP, or programming in general, so sorry about this completely basic question. 

 

I wrote a little program, the one I have attached here, that I'm hoping will execute the "exporttoautocad" command each time I open a drawing.  I have created a file named "acaddoc.lsp", added the code (load "aec2.lsp") to it and put this file in my "Support File Search Path", as I read to do in these forums.  From what I understand this should make it so my "aec2.lsp" program runs each time I open a drawing.  Problem is, it isn't happening and I don't know why.

 

Is there something in how I've constructed the "aec2.lsp" program that is making it not run?  Please take a look at the admittedly meager little file and let me know if there is something I have missed in how I wrote it or if I need to do something else to make it so this file loads and runs each time I open a drawing.

 

Thanks for any help offered.

4 REPLIES 4
Message 2 of 5
hmsilva
in reply to: clippincott-CL

"... I have created a file named "acaddoc.lsp", added the code (load "aec2.lsp")..."

need to call the function in the acadoc.lsp

(AWAY)

 

HTH

Henrique

EESignature

Message 3 of 5
clippincott-CL
in reply to: hmsilva

Such a quick reply!  Such an easy solution!  Thank you! 🙂

Message 4 of 5
hmsilva
in reply to: clippincott-CL

You're welcome.
Glad I could help

Henrique

EESignature

Message 5 of 5
scot-65
in reply to: clippincott-CL

Another method is to treat the program like a script by removing the opening and closing parenthesis:
;;;;;(defun XXX
[program here]
;;;;;);end defun

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