I got the snippit: ActiveSheet.Sheet.Name = iProperties.Value("Project", "Part Number" to change all the sheet names to the part number of the drawing file iproperty Part number, however...
What I am trying to accomplish is:
I have the assembly view of say a nightstand on sheet 1. On the following sheets I have drawing views for each component (one component per sheet).
I have the Part Number property mapped to my Title Block that populates with the Model property Part Number in each sheet. My rule would need to change the sheet name to that property of the Title block. This would make finding part drawings in the Vault web client a lot easier. And eleviate the manual entry process.
I found this code that works, but it errors out on the sheet that has the assembly view (sheet one). When I deleted the sheet with the assembly view It cycled through and changed the sheet names just fine.
Dim oSheets As Sheets
oSheets = ThisDoc.Document.sheets
Dim oSheet As Sheet
For Each oSheet In oSheets
oSheet.activate
Dim oDrawingView As DrawingView
oDrawingView = oSheet.DrawingViews(1)
oModelName = oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName
oDesc = iProperties.Value(oModelName, "Project", "Part Number")
oSheet.Name = oDesc
Next
Thanks, Appreciate the help.