正在加载...
0人已收藏
0人已打赏
0人已点赞
分享
全部回复(5 )
主题
回复
粉丝
CAD下载及教程
52.09 万条内容 · 667 人订阅
阅读下一篇
我用Vpstudio将扫描的地图矢量化后转为.dwg格式的文件,但在CAD中无法进行地图的色彩填充,特向高手请教,这里先行谢过.
遇到了一点小问题
内容不能包含下列词语
回帖成功
经验值 +10
全部回复(5 )
只看楼主 我来说两句;=========================================
;求pline面积和
(defun c:plareaplus (/ ss ssl x ea a)
(lhj_start)
(defun *error* (msg)
(princ "\n")
(princ "\n:::lhj_tools:::程序退出!")
(lhj_end)
(command)
)
(princ "\n请选取要求面积的pline线:")
(setq ss (ssget ’((-4 . "<or")
(0 . "LWPOLYLINE")
(0 . "SPLINE")
(0 . "CIRCLE")
(-4 . "or>")
)
)
)
(setq ssl (sslength ss))
(setq ea 0)
(while (> ssl 0)
(setq x (ssname ss (setq ssl (1- ssl))))
(command "area" "o" x)
(setq a (getvar "area"))
(setq a (/ a 1000000))
(setq ea (+ ea a))
)
(setq ea (rtos ea 2 1))
(princ "\n所选pline的和为")
(princ ea)
(princ "平方米")
(lhj_end)
(princ)
)
;标注pline面积
(defun c:plareadim (/ a temp pl loop pt)
(lhj_start)
(defun *error* (msg)
(princ "\n")
(princ "\n:::lhj_tools:::程序退出!")
(if pl
(redraw pl 4)
)
(lhj_end)
(command)
)
(setq loop "T")
(while loop
(setq pl (lhj_sel
"\n:::lhj_tools:::请选取要写面积的pline线:"
’((-4 . "<or")
(0 . "LWPOLYLINE")
(0 . "SPLINE")
(0 . "CIRCLE")
(-4 . "or>")
)
)
)
(if pl
(progn
(redraw pl 3)
(command "area" "o" pl)
(setq a (getvar "area"))
(setq a (/ a 1000000))
(setq a (strcat (rtos a 2 1) "平方米"))
(lhj_layer_set "pub_text" 2)
(lhj_tstyle_set "hztxt" 0.8)
(setq pt (getpoint "\n:::lhj_tools:::请点取文字插入点:"))
(redraw pl 4)
(if pt
(entmake (list (cons 0 "text")
(cons 8 "pub_text")
(cons 1 a)
(cons 40 350)
(cons 10 pt)
(cons 7 "hztxt")
)
)
)
)
(princ "\n:::lhj_tools:::选择的物体不是pline线!")
)
)
(lhj_end)
)
回复 举报
回复 举报