LISP Routine to place a Northing and Easting at the end of a leader
LISP Routine to place a Northing and Easting at the end of a leader
(OP)
My first post!
I found this code on this forum posted by IFRs (Petroleum)and made a couple changes based on what I was able to figure on my own.
(DEFUN C:PTT (/ osm p1 x y s p2) ; ID a point, place coordinates text
(graphscr)
(setq osm (getvar "osmode"))
(command "osmode" 53)
(setq p1 (getpoint "\nSNAP to point to be ID'd: ")
x (car p1)
y (cadr p1)
s (strcat "N:" (rtos y)"'" " E:" (rtos x)"'" )
)
(command "osmode" 0)
(setq p2 (getpoint p1 "\nPick point for end of Leader: "))
(COMMAND "DIM1" "LE" p1 p2 "" s)
(command "osmode" osm)
(princ)
)
I would like to see the N coordinate on one line and the E coordinate below it in the graphic. Can someone show me how to accomplish this? Thanks in advance.
I found this code on this forum posted by IFRs (Petroleum)and made a couple changes based on what I was able to figure on my own.
(DEFUN C:PTT (/ osm p1 x y s p2) ; ID a point, place coordinates text
(graphscr)
(setq osm (getvar "osmode"))
(command "osmode" 53)
(setq p1 (getpoint "\nSNAP to point to be ID'd: ")
x (car p1)
y (cadr p1)
s (strcat "N:" (rtos y)"'" " E:" (rtos x)"'" )
)
(command "osmode" 0)
(setq p2 (getpoint p1 "\nPick point for end of Leader: "))
(COMMAND "DIM1" "LE" p1 p2 "" s)
(command "osmode" osm)
(princ)
)
I would like to see the N coordinate on one line and the E coordinate below it in the graphic. Can someone show me how to accomplish this? Thanks in advance.





RE: LISP Routine to place a Northing and Easting at the end of a leader
RE: LISP Routine to place a Northing and Easting at the end of a leader
First of all: Thanks for posting the original code.
I still can't get the break to work though. I wind up with a "P" between my northing and easting in the graphic.
RE: LISP Routine to place a Northing and Easting at the end of a leader
Your code with the minor modifications:
(DEFUN C:PTT (/ osm p1 x y s p2) ; ID a point, place coordinates text
(graphscr)
(setq osm (getvar "osmode"))
(command "osmode" 53)
(setq p1 (getpoint "\nSNAP to point to be ID'd: ")
x (car p1)
y (cadr p1)
s (strcat "N:" (rtos y) "'" "\n" "E:" (rtos x) "'")
)
(command "osmode" 0)
(setq p2 (getpoint p1 "\nPick point for end of Leader: "))
(COMMAND "DIM1" "LE" p1 p2 "" s)
(command "osmode" osm)
(princ)
)
Again...Thanks for everything!
RE: LISP Routine to place a Northing and Easting at the end of a leader