Message 1 of 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the code below to name the sheets for easy export to DWG.
SyntaxEditor Code Snippet
Dim oSheets As Sheets = ThisDrawing.Document.sheets Dim oSheet As Sheet Dim count As Integer count=0 For Each oSheet In oSheets count+=1 Page_Count=count 'MessageBox.Show(Page_Count) oSheet.activate Dim oDrawingView As DrawingView = oSheet.DrawingViews(1) oModel = ActiveSheet.View(oDrawingView.Name).ModelDocument EquipName = oModel.PropertySets.Item("Inventor Summary Information").Item("Comments").Value EquipName1=Left(EquipName,3) ActiveSheet.Sheet.Name =EquipName1 & " S" & Page_Count Next
which provides a result of
001 S1
001 S2
002 S3
002 S4
My preferred result would be
001 S1
001 S1
002 S1
002 S2
In other words I want the "S""number" to count with the instance of the "EquipName1".
Solved! Go to Solution.
