土木在线论坛 \ 建筑设计 \ CAD下载及教程 \ 计算墙肢截面积的命令

计算墙肢截面积的命令

发布于:2006-03-28 12:33:28 来自:建筑设计/CAD下载及教程 [复制转发]
版主,帮忙编一个计算整幢住宅建筑的墙肢截面积的命令啥?谢谢(其中有大量布置的L、T等形状的剪力墙)。如果用CAD自身带的LIST命令,只能一个一个的去查封闭的图形面积,太麻烦了。版主,救急哟!

全部回复(5 )

只看楼主 我来说两句
  • lqjswj1976
    lqjswj1976 沙发
    版主,顺便帮我看看这个程序为啥在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)
    )



    2006-07-01 11:05:01

    回复 举报
    赞同0
  • lqjswj1976
    lqjswj1976 板凳
    版主,调试一下这个程序啥,谢谢
    2006-07-01 11:02:01

    回复 举报
    赞同0
加载更多
这个家伙什么也没有留下。。。

CAD下载及教程

返回版块

52.08 万条内容 · 657 人订阅

猜你喜欢

阅读下一篇

求助:cad中的地图填充问题

我用Vpstudio将扫描的地图矢量化后转为.dwg格式的文件,但在CAD中无法进行地图的色彩填充,特向高手请教,这里先行谢过.

回帖成功

经验值 +10