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

Simple Lips error - Autocad 2015

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
678 Views, 3 Replies

Simple Lips error - Autocad 2015

Greetings,

 

Using a following lisp routine:

 

;distance nearest to perpendicular
(defun C:qd:f ()
(prompt "\nDistance nearest to perpendicular")
(command "dist" "nea" pause "per")
(princ)
);

 

I have got an error message:

 

Command: qd
Initializing...distance
DISTANCE = 0.0000 (read only)
Command: _nea Unknown command "NEA".  Press F1 for help.

The routine worked well within Autocad 2011. I will be grateful for any helpful clue to resolve the problem. I find the command very usefull for my work.

Thank you in advance.

 

PS

A lisp folder is marked as a trustful path.

 

 

 

 

3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: Anonymous

Hi GThib,

 

from the error message,

 

"Command: qd
Initializing...distance
DISTANCE = 0.0000 (read only)
Command: _nea Unknown command "NEA".  Press F1 for help."

 

the "_dist" is calling the System Variable "DISTANCE", not the command "DIST", "probably" is redefined in some customization.

I don't have AutoCAD 2015 this old laptop, try the following code and see if it makes any difference

 

(defun C:qd:f ()
(prompt "\nDistance nearest to perpendicular")
(command "_.dist" "_NEA" pause "_PER")
(princ)
)

 

HTH
Henrique

EESignature

Message 3 of 4
Anonymous
in reply to: hmsilva

Thank you very much. I does work.

I have also noticed that by changing the command (ex. c:123) for the routine (my quoted original one) I have managed to get it work while the qd did not activate the function.

You solution has resolved my problem.
Message 4 of 4
hmsilva
in reply to: Anonymous

You're welcome, GThib
Glad I could help

Henrique

EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost