老大!帮忙看看,自己没搞定,arc坐标输出,谢谢了
<p>Sub test()<br/> Dim X As Double, y As Double, Z As Double<br/> Dim n As Long<br/> n = ThisDrawing.ModelSpace.Count</p><p> Dim Pt As Variant<br/> Pt = ThisDrawing.Utility.GetPoint(, "指定内部点: ")<br/> ThisDrawing.SendCommand "_-Boundary" & vbCr & Pt(0) & "," & Pt(1) & vbCr & vbCr</p><p> Dim lwpLineObj As AcadLWPolyline<br/> If ThisDrawing.ModelSpace.Count > n Then<br/> Set lwpLineObj = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)<br/> 'MsgBox "面积" & Format(lwpLineObj.Area, "0.000") & "平方米"<br/> 'lwpLineObj.Delete<br/> Else<br/> MsgBox "未发现有效的边界"<br/> End If<br/> Dim i As Long, num As Long<br/> Dim retCoord As Variant<br/> num = 0<br/> retCoord = lwpLineObj.Coordinates<br/> num = (UBound(retCoord) - LBound(retCoord) + 1) / 2<br/> <br/> For i = 0 To num - 1<br/> X = retCoord(2 * i + 1)<br/> y = retCoord(2 * i)<br/> MsgBox ("X=" & X & " " & "Y=" & y)</p><p>怎么判断是圆弧,并把圆弧的数据读出??????????? 谢谢了<br/> Next i<br/>End Sub</p> Dim sset As AcadSelectionSet<br/> Dim obj As Object<br/> Dim objarc As AcadArc<br/> For Each obj In sset<br/> If TypeOf obj Is AcadArc Then<br/> Set objarc = obj<br/> End If<br/> '获得圆弧的数据<br/> Next
页:
[1]