用vba在某一个封闭区域内点击生成一个面域,查属性是面域,但是MsgBox "类型" & TypeName显示的不是面域,为什么?ThisDrawing.SendCommand "-boundary" & vbCr & "a" & vbCr & "i" & vbCr & "y" & vbCr & "o" & vbCr & "r" & vbCr & vbCr & pnt(0) & "," & pnt(1) & vbCr & vbCr ’生成一个面域
ThisDrawing.SendCommand "-boundary" & vbCr & "a" & vbCr & "i" & vbCr & "y" & vbCr & "o" & vbCr & "r" & vbCr & vbCr & pnt(0) & "," & pnt(1) & vbCr & vbCr ’生成一个面域
’选择这个面域
If ThisDrawing.SelectionSets.Count <> 0 Then
For i = 0 To ThisDrawing.SelectionSets.Count - 1
Set sel1 = ThisDrawing.SelectionSets.item(i)
sel1.Delete
Next
End If
Set sel1 = ThisDrawing.SelectionSets.Add("s") ’
sel1.Select acSelectionSetAll ’选择上次创建的对象
MsgBox "类型" & TypeName(sel1.item(sel1.Count - 1)) ’显示选择物体的类型