|
发表于 2004-10-15 09:22:00
|
显示全部楼层
作选择集:
Public Sub test()
' Create the selection set
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add("SSET")
Dim mode As Integer
mode = acSelectionSetAll
' Add all the Circles to the selection set that lie within the crossing of (28,17,0) and
' (-3.3, -3.6,0) by filtering from the current drawing
Dim gpCode(0 To 1) As Integer
Dim dataValue(0 To 1) As Variant
gpCode(0) = 0
dataValue(0) = "Insert"
gpCode(1) = 2
dataValue(1) = "a" '块名
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
ssetObj.Select mode, , , groupCode, dataCode
MsgBox ssetObj.Count
'然后你循环ssetObj中的每个块实体...
End Sub |
|