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

Autocad 2013 doesn't recognize my lisp commands

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
BBakerGT
5403 Views, 5 Replies

Autocad 2013 doesn't recognize my lisp commands

I have writted a set of lisp routines with dcl files that I have implemented in most versions of Autocad since release 14. I can install the toolbars in Autocad 2013 but when I try to execute on of the commands, either by toolbar icon or command line, I get the message "Unknown Command".

 

I have added the appropriate paths to path list.

 

Dell Precision M4400 Laptop

Vista Business

5 REPLIES 5
Message 2 of 6
wayne.brill
in reply to: BBakerGT

Hi,

 

From your description I would guess that the lisp functions have not been loaded in the drawing. What happens if you try to run the function defined as a command from the command line?

(c:myfunction)

 

If you can't get this resolved, can you provide a small example that I can use to recreate the behavior?



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 3 of 6
BBakerGT
in reply to: BBakerGT

Hi Wayne,

 

I have 23 commands defined in Acad.lsp. These commands load and execute functions in 14 lisp files with 13 dcl files. An example of a command definition inAcad.lisp is as follows:

 

(defun C:BITDESIGN ()

    (if (/= 1 (boole 1 1 (getvar "USERI1)))

        (load "ddesign.lsp")

    )

    (bdesign)

)

 

The second line checks user variable USERI1 to see if "ddesign.lsp is already loaded; if not it is loaded.

bdesign is the routine executed in ddesign.lsp.

 

I have run the BITDESIGN command from its icon in a toolbar and from the command line. In each case I get the message "Unknown command "BITDESIGN".

 

This indicates that ACAD.LSP is not being loaded. I have added the proper path in "Tools/Options/Files". I have placed ACAD.LSP in the AutoCAD 2013/Support folder and in the AutoCAD/UserDataCache/Support folder. Is there another folder that I need to copy my acad.lsp folder to?. I have also checked the "Load Acad.lsp with each drawing" in the Tools/Options dialog.

 

Thanks,

Bill

Message 4 of 6
Rick-K
in reply to: BBakerGT

Search your computer for all "Acad.lsp" files, autocad will load the first one it finds. It is probably finding one you are not aware of.

 

Since everything is loaded in the acad.lsp I would try placing an alert box line in the acad.lsp to see if it is loading.

Perhaps right before your first Defun.

 

(alert "its loading")

 

This way you know that it is indeed loading your acad.lsp.

 

Rick

Message 5 of 6
scot-65
in reply to: BBakerGT


BBakerGT wrote: 

>> This indicates that ACAD.LSP is not being loaded.

Thanks,

Bill


 

Possible fixes:

 

(findfile "ACAD.LSP")

Is there a path?

 

Check to see if ACADLSPASDOC and LISPINIT are set to 1.

An alternative is to rename the file to ACADDOC.LSP.

 

???

 


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


Message 6 of 6
BBakerGT
in reply to: BBakerGT

Thanks Rick-K,

 

Sure enough there was another acad.lsp in the acadm folder. I appended my acad.lsp to that one and everything is working.

 

I have another situation but not really a problem. When I tried to install my lisp programs using a legacy .cui file, AutoCad wouldn't let me save the new .cuix file and the installation failed. I was logged on as myself (with administrator privileges). When I logged on as administrator, I had no problem with the installation. It's not really a problem since I can log on as administrator, but I was curious why it didn't work. Is this likely a Windows Vista problem rather than an AutoCad problem?

 

Bill

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

Post to forums  

Autodesk Design & Make Report

”Boost