获取面域属性信息问题
<p>是这样的:在cad中,可以用massprop命令查询选定面域或实体的特性属性,比如面积,惯性矩等等,现在情况是:我在vba中选定了一个面域,并用sendcommand方法调用massprop命令查询该面域的属性,请问怎么样获取这些属性信息?这些信息在后续的编程中还需要用到,请高手多多指教!!!</p> <p>用sendcommand方法调用massprop命令查询该面域的属性? 为什么要那样做?</p><p>Sub Ch4_CreateRegion()<br/> ' Define an array to hold the<br/> ' boundaries of the region.<br/> Dim curves(0 To 0) As AcadCircle</p><p> ' Create a circle to become a<br/> ' boundary for the region.<br/> Dim center(0 To 2) As Double<br/> Dim radius As Double<br/> center(0) = 2<br/> center(1) = 2<br/> center(2) = 0<br/> radius = 5#<br/> Set curves(0) = ThisDrawing.ModelSpace.AddCircle _<br/> (center, radius)</p><p> ' Create the region<br/> Dim regionObj As Variant<br/> regionObj = ThisDrawing.ModelSpace.AddRegion(curves)<br/> MsgBox regionObj(0).ProductOfInertia</p><p> ZoomAll<br/>End Sub</p> 这个是圆周率呀
页:
[1]