[求助]LISP提取三维实体的体积
怎么搞,实体的体积啊,entget 没有要用的东西,用<font face="Verdana">massprop怎么取啊!!帮帮忙啊</font> <p> </p><p><font face="Verdana">(defun c:tj()<br/> (while (setq ent (car (entsel "\n选择三维实体:")))<br/> (redraw ent 3)<br/> (setq vob (vlax-ename->vla-object ent)<br/> v (vl-catch-all-apply 'vla-get-Volume (list vob))<br/> )<br/> (if (vl-catch-all-error-p v)<br/> (alert "所选取的图元不具有体积属性!")<br/> (alert (strcat "体积=" (rtos v)))<br/> )<br/> (redraw ent 4)<br/> )<br/> (princ)<br/>)</font></p>
<p> </p> 非常感谢,我试试 yshf 发表于 2010-10-23 22:05
(defun c:tj() (while (setq ent (car (entsel "\n选择三维实体:"))) &nbs ...
这个代码让计算出的结果像前移动九位书写到CAD绘图区,后面加上单位立方米,感谢大佬指点
页:
[1]