其实很简单的,不用三楼那么麻烦的。
(defun c:pt()
(setvar "cmdecho" 0)
(while (setq pt1 (getpoint "\n请指定点位置:"))
(setq point_x (rtos (car pt1) 2 2))
(setq point_y (rtos (cadr pt1) 2 2))
(setq point_z (rtos (caddr pt1) 2 2))
(command "_text" pt1 "" "" (strcat "(" point_x "," point_y "," point_z ")"))
)
(princ)
)
效果如图所示
getpoint
(setq a (getpoint "dian"))
(setq b (strcat (rtos (car a) 2 2) "," (rtos (cadr a) 2 2) "," (rtos (caddr a) 2 2) ))
(command "-text" a "" "" b "")
不清楚你想怎么具体显示,下面的程序你可试试,我属LISP初级的那种,偶尔工作需要编个小东东自己用,见笑了哈。
(defun c:point()
(princ