Customization > Automation Interface > Functions > For Modeler Items > Functions for Collections > Functions for looping through collection objects (automation interface)
Functions for looping through collection objects (automation interface)
With these functions you can loop through collection objects such as a project, dictionary or diagrams. If you are using Visual Basic version 5.0 or the Application Edition, you can use the "For Each Item in Collection" construct instead.
For Each Project in Projects...Next
ResetQueryItems Function
Reset the current query position to the start of the collection object.
MoreItems Function
Indicates if there are more items to return in the collection
NextItem Function
Return the next object held in the collection.
To loop through all the projects in a system:
Projects.ResetQueryItems
Do While Projects.MoreItems
Set obj Project=Projects.NextItem
Loop
Was this helpful?