Message 1 of 7
Loop Thru Sheets Via Display Order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
With the following code I can randomly loop through sheets in a dst file data base. Is thare a way to loop through the sheets via their diplay order in the sheet set manager? Ultimately I am looking to increment a custom property that is based on display order.
Thanks.
Chris
Private Sub LoopThruSheets(ByVal sheetSetDatabase As IAcSmDatabase)
' Get the objects in the sheet set
Dim enumerator As IAcSmEnumPersist
enumerator = sheetSetDatabase.GetEnumerator()
' Get the first object in the Enumerator
Dim item As IAcSmPersist
item = enumerator.Next()
' Step through all the objects in the sheet set
Do While Not item Is Nothing
Dim sheet As IAcSmSheet = Nothing
' Check to see if the object is a sheet
If item.GetTypeName() = "AcSmSheet" Then
sheet = item
MsgBox(sheet.GetName.ToString)
End If
' Get the next Sheet
item = enumerator.Next()
Loop
End Sub
