再问一个问题,在输出封闭区域坐标的时候,如果有圆弧,怎么确定圆弧(起点,弧长,端点),我试了一下“凸度”没有搞明白,谢谢飞狐大侠!! Sub test() Dim X As Double, y As Double, Z As Double Dim n As Long n = ThisDrawing.ModelSpace.Count Dim Pt As Variant Pt = ThisDrawing.Utility.GetPoint(, "指定内部点: ") ThisDrawing.SendCommand "_-Boundary" & vbCr & Pt(0) & "," & Pt(1) & vbCr & vbCr Dim lwpLineObj As AcadLWPolyline If ThisDrawing.ModelSpace.Count > n Then Set lwpLineObj = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1) 'MsgBox "面积" & Format(lwpLineObj.Area, "0.000") & "平方米" 'lwpLineObj.Delete Else MsgBox "未发现有效的边界" End If Dim i As Long, num As Long Dim retCoord As Variant num = 0 retCoord = lwpLineObj.Coordinates num = (UBound(retCoord) - LBound(retCoord) + 1) / 2 For i = 0 To num - 1 X = retCoord(2 * i + 1) y = retCoord(2 * i) MsgBox ("X=" & X & " " & "Y=" & y) 怎么判断是圆弧,并把圆弧的数据读出??????????? 谢谢了 Next i End Sub |