gzbccy
发表于 2010-12-15 15:13:48
这么厉害啊。佩服啊
自贡黄明儒
发表于 2011-1-31 22:07:58
本帖最后由 自贡黄明儒 于 2011-3-11 10:58 编辑
很实用,谢谢了!!!
;;;;;;;;;;;;;;;本程序用于修改等高线高程
;;;NewElevation高程和NewGradeElevation高程增量为全局
;;;命令(hh-ggcZ)
(defun hh-ggcZ (/ A EN END GRADEELEVATION N OBJECT SS SS4 STARTELEVATION)
(vl-load-com)
(if NewElevation
(progn (setq startElevation
(getreal (strcat "\n起始高程<"
(rtos NewElevation 2 3)
">:"
)
)
)
(if (= startElevation nil)
(setq startElevation NewElevation)
)
)
(progn (initget 1)
(setq startElevation (getreal "\n起始高程? "))
)
)
(if NewGradeElevation
(progn (setq GradeElevation
(getreal (strcat "\n高程增量<"
(rtos NewGradeElevation 2 3)
">:"
)
)
)
(if (= GradeElevation nil)
(setq GradeElevation NewGradeElevation)
)
)
(progn (initget 1)
(setq GradeElevation (getreal "\n高程增量? "))
)
)
(Setq ss (lt:ssget '("\n选择多义线,多义线高程将依次被修改...."
((0 . "POLYLINE,LWPOLYLINE"))
)
)
)
(setq NewElevation startElevation
NewGradeElevation GradeElevation
)
(if ss
(progn
(setq ss4 (sslength ss))
(setq n 0)
(while (/= ss4 n)
(setq en (ssname ss n))
(setq object (vlax-ename->vla-object en))
(vla-put-Color object 2)
(setq end (entget en))
(setq a (cdr (assoc 0 end)))
(if (= a "LWPOLYLINE")
(entmod (subst (cons 38 NewElevation) (assoc 38 end) end))
)
(if (= a "POLYLINE")
(entmod
(subst (reverse
(cons NewElevation (cdr (reverse (assoc 10 end))))
)
(assoc 10 end)
end
)
)
)
(setq n (+ n 1))
(SETQ NewElevation (+ NewElevation GradeElevation))
)
)
(princ "\n未选中多义线,再见!")
)
)
;;;;;;;;;;;;;;;本程序用于修改等高线高程
sy100
发表于 2011-2-8 11:22:38
下载试用一下,谢谢!
461045462
发表于 2011-2-8 21:26:40
本帖最后由 461045462 于 2011-2-10 19:39 编辑
谢谢楼主的分享
试用后发现只能一根一根改变,.........
gzbccy
发表于 2011-3-2 09:24:44
应该还是比较适用的吧,对测绘的人士比较适用
Alidady
发表于 2011-3-5 22:34:04
标注高程值时是不是需要定义标注的两个高程点?
rxwzlj
发表于 2011-12-8 17:27:45
找了好久,谢谢
rxwzlj
发表于 2011-12-8 17:36:19
怎么不能用呀
wsjwsjwsj
发表于 2013-10-30 23:16:59
大大大大大大大大大大大大大大大大大大大大大大大大大大大大大大
LHD244
发表于 2015-4-24 22:06:33
dassssssssssss