;----------------------------------------------------------------------------------------------------------------------
;依据点坐标文件生成多段线(封闭多段线)。
;----------------------------------------------------------------------------------------------------------------------
(defun c:ddr()
(setvar "cmdecho" 1)
(setvar "osmode" 0)
(setvar "modemacro" " YuCheng ")
(setq zb_file (getfiled "选择点坐标文件" "" "txt" 0))
(setq x (open zb_file "r"))
(prompt"\n.\n.\nwait...")
(princ)
(while (setq pt (read-line x))
(command "_.pline" pt)
(while (and (/= (setq pt (read-line x)) "END") (/= pt "end") (/= pt nil) (/= pt ""))
(command pt)
)
(command "c")
(command)
(command)
(setq ent (entlast