;;;给你一段代码,看看是不是你需要的
(defun c:write-point () (princ "\n请选择需要显示的坐标点...") (setq ss (ssget)) (setq num (sslength ss)) (setq num1 0) (SETQ LST NIL) (princ "\n准备写点...") (repeat num (setq ss1 (ssname ss num1)) (setq ss_data (entget ss1)) (setq ss_name (cdr (assoc 0 ss_data))) (if (= ss_name "POINT") (progn (setq ss_DATA1 (cdr (assoc 10 ss_data))) (princ "\n点坐标为:") (princ ss_data1) ) ) (Setq num1 (1+ num1)) ) (princ "\n完毕!") (princ) ) |