发布网友 发布时间:2022-04-22 07:33
共2个回答
热心网友 时间:2022-06-17 19:22
Public Sub ss_region()
Dim ss As AcadSelectionSet, region As Variant, p(0 To 2)
Set ss = ThisDrawing.SelectionSets.Add("sss")
ss.SelectOnScreen
Dim ents(0 to 1) As AcadEntity
Dim i As Integer
For i = 0 To 1
Set ents(i) = ss.Item(i)
Next i
ss.Delete
region = ThisDrawing.ModelSpace.AddRegion(ents)
region("0").Boolean acIntersection, region("1")
If region("0").Area > 0 Then
MsgBox "非空交集"
‘MsgBox region("0").Centroid(0)
p(0) = region("0").Centroid(0)
p(1) = region("0").Centroid(1)
P(2) = 0
Call ThisDrawing.ModelSpace.AddCircle(p, 0.5)
region("0").Delete
Else
MsgBox "交集为空"
End If
End Sub追问没有返回值?面域已经做好了
热心网友 时间:2022-06-17 19:22
现场vgf出现个梵蒂冈反倒是