|
(defun c:tt ();;;;; (setq path (getfiled "选择保存位置" (xlr_get_dwg) "csv" 1)) (setq csv_fp (open path "w")) (write-line (strcat "编号" "," "X坐标" "," "Y坐标" "," "高程") csv_fp ) (princ) (setq num 0) (while (setq pt (getpoint "\n 指定点<退出>")) (setq num (1+ num)) (xlr_make_point pt "编号") (xlr_put_text (strcat " "(rtos num 2 0)) pt 0 0 "编号" 7) (setq x (rtos (nth 0 pt) 2)) (setq y (rtos (nth 1 pt) 2)) (setq z (rtos (nth 2 pt) 2)) (setq ztxx (strcat (rtos num 2 0) "," x "," y "," z)) (write-line ztxx csv_fp) (princ) ) (close csv_fp) (alert "提取完成!!") ) |
|