06-01-2015
09:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-01-2015
09:44 AM
Hello all,
I am using this code to put scale on block and use before save document as trigger, however if I have more than one page on my idw file, everytime i save, I always go back to the last page.
Is this anyway to keep same page ?
For Each Osheet In ThisApplication.activedocument.sheets ActiveSheet=ThisDrawing.Sheet(osheet.Name) If osheet.TitleBlock Is Nothing Or osheet.drawingviews.count=0 Then Exit Sub otitleblock=osheet.TitleBlock otextboxes=otitleblock.definition.sketch.textboxes For Each otextbox In otextboxes If otextbox.text= "<ÉCHELLE>" Then drawingviewname =ThisApplication.activedocument.ActiveSheet.drawingviews.item(1).Name otitleblock.setpromptresulttext(otextbox, ActiveSheet.View(drawingviewname).ScaleString) End If Next Next ThisApplication.activedocument.sheets.item(1).activate InventorVb.DocumentUpdate()
Solved! Go to Solution.