coordinate indication
coordinate indication
(OP)
hi
what functions could be used to indicate a coordinate of a point?
what functions could be used to indicate a coordinate of a point?
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: coordinate indication
2) Here is a LISP macro that places the coordinates of a POINT in the drawing.
(DEFUN C:PTT (/ osm p1 x y z s h 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)
z (caddr p1)
s (strcat "(" (rtos x) "," (rtos y) "," (rtos z) ")" )
h (getvar "textsize")
)
(command "osmode" 0)
(setq p2 (getpoint "\nPick point for middle of text: "))
(COMMAND "TEXT" "Ju" "M" p2 h "0" s)
(command "osmode" osm)
)
RE: coordinate indication
how do you program a LISP command?
RE: coordinate indication
Alex
RE: coordinate indication
If you are asking how to learn LISP, my advice is to read other people's code and experiment. Autocad Help will list the commands available. There are books out there, lots of them. There are very helpful web sites also - just search for LISP. If you have any experience programming in almost any language, you can pick up LISP in a heartbeat.
Each word in LSIP means something easy. For example (setq variable expression) means evaluate the expression and place the result in variable A. It's like learning French. Master the alphabet (ie LISP commands), get to know the grammar and then learn from the work of others.