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

Setting Out LISP query

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
jhockley
388 Views, 3 Replies

Setting Out LISP query

I have a LISP routine (below) that shows the bottom co-ords 19.754, -3.663

 

I want it to show like the top one - with a carriage return in it.

 

 

19.754

-3.663

 

(defun c:lb (/  p x y ptcoord textloc)
  (while
    (setq p (getpoint "\nPick Point: "))
    (setq textloc (getpoint "\nPick Label Location: "))
    (setq x (rtos (car p)))
    (setq y (rtos (cadr p)))
    (setq ptcoord (strcat x ", " y))
    (command "_LEADER" p textloc "" ptcoord "")
  )
)

 

 

 

What is the simple adjustment to the code that will make this possible?

 

Also if i wanted to make it like this:

 

X= 19.754

Y= -3.663

 

what would i have to do?

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

Perhaps something like this

 

(defun c:lb (/  p x y ptcoord textloc)
  (while
    (setq p (getpoint "\nPick Point: "))
    (setq textloc (getpoint "\nPick Label Location: "))
    (setq x (rtos (car p)))
    (setq y (rtos (cadr p)))
    (setq ptcoord (strcat "X= "x "\\PY= " y))
    (command "_LEADER" p textloc "" ptcoord "")
  )
)

 


Henrique

EESignature

Message 3 of 4
jhockley
in reply to: hmsilva

Thanks very much

Message 4 of 4
hmsilva
in reply to: jhockley

You're welcome!
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