(defun c:plzbsc()(princ “n 选择所需输出的点(point):“)(setq ss (ssget );选取坐标点(setq n (sslength ss );计算坐标点数量(setq ff (open (getfiled “文件保存为“ “f:/“ “dat“ 1) “w“);保存路径(setq i 0)(repeat n(setq spt (ssname ss i )(setq ept (entget spt)(if (= (cdr (assoc 0 ept) “POINT“)(progn(setq lxyz (cdr (assoc 10 ept)(setq sx (rtos (nth 1 lxyz);将坐标值实数转换成字符(setq sy (rtos (nth 0 lxyz)(setq sz (rtos (nth 2 lxyz)(setq i1 (+ i 1);计算点序号(setq sn (rtos i1 2 0);将序号实数转换成字符(setq sxyz (strcat sn“,“ sy “,“ sx “,“ sz)(write-line sxyz ff)(setq i (+ i 1);repeat)(prompt “* *输出格式(点号, Y,X,Z ) *“)(prin1)