Enumerate_All_Groups Method Example
The following code provides an example of the Enumerate_All_Groups method:
Public Function GetAllGroupList(objPic As CFixPicture, ByRef colDIList As Collection) As Boolean
Dim colPIC As CFixObjectCollection
Dim colList As CFixObjectCollection
Dim objDI As Object
If TypeName(objPic) = "Nothing" Or objPic.Category <> "Pictures" Then
GetAllGroupList = False
GoTo CLEAN_UP
End If
'If objHelper.ClassName <> "GeometryHelper" Then
' GetMasterDynamoList = False
' GoTo CLEAN_UP
'End If
' clear dynamo instance list
Do While colDIList.Count > 0
colDIList.Remove (1)
Loop
' get all Master Dynamos on a specified DynamoSets
Set colPIC = objPic.ContainedObjects
Call PlugandSolve.GeometryHelperObj.Enumerate_All_Groups(colPIC, colList)
If colList.Count <= 0 Then
GetAllGroupList = True
GoTo CLEAN_UP
End If
For Each objDI In colList
colDIList.Add objDI
Next objDI
GetAllGroupList = True
CLEAN_UP:
On Error Resume Next
Set colList = Nothing
Set colPIC = Nothing
Set objDI = Nothing
End Function