Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
srionde
549 Views, 5 Replies

Sclae on tile block with Ilogic

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()

 

Tags (1)