VB group codes for Groups
VB group codes for Groups
(OP)
Im attempting to try the filterdata on a selection set.
Straightforward enough for graphic entities; but how could i filter for a "Group" object itself?
Straightforward enough for graphic entities; but how could i filter for a "Group" object itself?
RE: VB group codes for Groups
You don't. Use this utility I've adapted from my FAQ687-5792: Easier selection set creation in VB/VBA. :
CODE
'
' *** vbdPowerGroup ***
'
' Function to add a new group by name, and check
' for an existing group.
'
Dim objGrp As AcadGroup
Dim objGrpCol As AcadGroups
Set objGrpCol = AcadDoc.Groups
For Each objGrp In objGrpCol
If objGrp.Name = strName Then
objGrpCol.Item(strName).Delete
Exit For
End If
Next
Set objGrp = objGrpCol.Add(strName)
Set vbdPowerGroup = objGrp
End Function
HTH
Todd