SheetSet index

SheetSet index

Anonymous
Not applicable
282 Views
0 Replies
Message 1 of 1

SheetSet index

Anonymous
Not applicable
I have written some code that pulls sheets and subsets from the sheetset manager, but the information that comes out, is out of order. Is there a way to pull this information out in the same order that it appears in the sheetset manager pallet? Or is there a way to get some kind of index number for each sheet and subset, that reflects the order as it appears in the sheetset?
Pulling the page numbers, does not help, because our page numbers have letters and numbers.
Here is the code for pulling information out of the sheetset:
{code}
Dim ShtNum As String
Dim oSubset As AcSmSubset
Dim pSubset As AcSmSubset
Dim oSheet As AcSmSheet
Dim oItem As IAcSmPersist
Dim ShSetAR(1 To 3, 1 To 200) As String
Dim ShSetARCount As Integer

'' Synchronize Sheets with Sheet Properties
Private Sub CopyShsetarray()
'' Create a Reference to the Sheet Set Manager Object
Dim oSheetSetMgr As AcSmSheetSetMgr
Set oSheetSetMgr = New AcSmSheetSetMgr
'' Get the current Sheet Set
Dim oSheetDb As AcSmDatabase
Set oSheetDb = oSheetSetMgr.GetDatabaseEnumerator().Next
'' Get the objects in the Sheet Set
Dim oEnum As IAcSmEnumPersist
Set oEnum = oSheetDb.GetEnumerator
'' Get the first object in the Enumerator
MsgBox oSheetDb.GetFileName
Set oItem = oEnum.Next
'' Step through all the objects in the Sheet Set
MsgBox oItem.GetTypeName
Do While Not oItem Is Nothing

'' Add Item to Array
On Error Resume Next

If oItem.GetTypeName = "AcSmSheet" Or oItem.GetTypeName = "AcSmSubset" Then
ShSetARCount = 1 + ShSetARCount
Set pSubset = oItem.GetOwner()
ShSetAR(2, (ShSetARCount)) = pSubset.GetName
ShSetAR(3, (ShSetARCount)) = oItem.GetTypeName
If oItem.GetTypeName = "AcSmSheet" Then
Set oSheet = oItem
ShSetAR(1, (ShSetARCount)) = ShtNumFromPath(oSheet.GetLayout.GetFileName)
Else
Set oSubset = oItem
ShSetAR(1, (ShSetARCount)) = oSubset.GetName
End If
'MsgBox ShSetARCount & "___" & ShSetAR(1, (ShSetARCount)) & "___" & ShSetAR(2, (ShSetARCount)) & "___" & ShSetAR(3, (ShSetARCount))
End If

'' Get the next Sheet
Set oItem = oEnum.Next
Loop
Next
End Sub
{code}

I'm basically trying to create a link between our database and our sheetsets, and I need to know the order that things appear in the sheetset, because some of our employs don't understand the complicated way our package needs to be arranged. Edited by: kaibo on Jan 8, 2009 12:50 AM
0 Likes
283 Views
0 Replies
Replies (0)