IV10Sp3a Is there a property that is the sheet number (Integer) - I found Name

IV10Sp3a Is there a property that is the sheet number (Integer) - I found Name

Anonymous
Not applicable
282 Views
2 Replies
Message 1 of 3

IV10Sp3a Is there a property that is the sheet number (Integer) - I found Name

Anonymous
Not applicable
Is there a read property that is the sheet number (Integer)? I found Name, which I think is a string, but I am having trouble reading either so I can add this to the filename during pdf creation. Is it possible to read a sheet number or a name, or am I stuck with a counter?

Pete
0 Likes
283 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
There isn't a specific property that returns this. However, this information
can be inferred from the name of the sheet. The sheet number is always
appended to the sheet name (and the numbering is reset if the sheets are
reordered, deleted, etc.). Here is a sample that extracts the index from the
sheet name:

Sub SheetIndex()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oSheet As Sheet
Set oSheet = oDoc.SelectSet.Item(1)

' Get the location of ":" within the name
Dim location As Long
location = InStrRev(oSheet.Name, ":", , vbTextCompare)

' Get the string to the right of ":"
Dim SheetIndexStr As String
SheetIndexStr = Right$(oSheet.Name, Len(oSheet.Name) - location)

' Get the long value of the index
Dim SheetIndex As Long
SheetIndex = CLng(SheetIndexStr)
End Sub

Sanjay-


wrote in message news:5622530@discussion.autodesk.com...
Is there a read property that is the sheet number (Integer)? I found Name,
which I think is a string, but I am having trouble reading either so I can
add this to the filename during pdf creation. Is it possible to read a
sheet number or a name, or am I stuck with a counter?

Pete
0 Likes
Message 3 of 3

Anonymous
Not applicable
Ahh so (dot)Name is actually "Sheet(colon)?" etc. I had thought (dot)Name was the information after the colon.

Thank you ..any ideas on the multiple file select?

Pete
0 Likes