该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
defun c:ZHDGX()
(claim)
(command "layer" "m" "dgxj" "")
(command "layer" "c" "blue" "dgxj" "")
(dgx)
)
(princ "\n******** 键入ZHDGX 启动程序 ***\n")
;;;;;;;;;;;;;;;;;;;;;;;;;
(defun claim()
(alert"\n<< 转换等高线程序 >>")
)
;;;;;;;;;;;;;;;;;;;;;;;;;
(defun dgx()
(setq NEWDIST(getreal"请输入转换等高线的等高距:"))
(prompt "请选择等高线:")
(setq SS(ssget))
(setq len(sslength SS))
(setq n 0)
(repeat len
(setq ent(ssname ss n))
(setq entdate(entget ent))
(setq pd(assoc 0 entdate)))
(setq t1( * NEWDIST 5))
(if(=pd "TEXT")
(PROGN
(setq gc1(assoc 10 entdate))
(setq gc2(cdr gc1))
(setq x0(car gc