计算墙肢截面积的命令
lqjswj1976
lqjswj1976 Lv.3
2006年03月28日 12:33:30
只看楼主

版主,帮忙编一个计算整幢住宅建筑的墙肢截面积的命令啥?谢谢(其中有大量布置的L、T等形状的剪力墙)。如果用CAD自身带的LIST命令,只能一个一个的去查封闭的图形面积,太麻烦了。版主,救急哟!

版主,帮忙编一个计算整幢住宅建筑的墙肢截面积的命令啥?谢谢(其中有大量布置的L、T等形状的剪力墙)。如果用CAD自身带的LIST命令,只能一个一个的去查封闭的图形面积,太麻烦了。版主,救急哟!
免费打赏
sws_pub
2006年03月30日 14:02:14
2楼
天正建筑有自动计算并标注封闭面积的命令,装一个用一下咯,:)
回复
lqjswj1976
2006年04月07日 14:35:10
3楼
版主,为何我加载后,用pla命令后,按提示选择对象,总是提示“已滤除几个”?怎么办?
回复
lqjswj1976
2006年04月10日 08:47:09
4楼
对呀。版主,你试过这个命令吗?
回复
lqjswj1976
2006年07月01日 11:02:52
5楼
版主,调试一下这个程序啥,谢谢
回复
lqjswj1976
2006年07月01日 11:05:37
6楼
版主,顺便帮我看看这个程序为啥在CAD2002中加载后用不起?(在CAD2004里面用的)
;=========================================
;求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)
)



回复

相关推荐

APP内打开