Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: srionde

I use the same rule to write 'View Scale'

 

I have a problem when I save the documents.

kép3.JPG

kép4.JPG

 

My rule:

 

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="<View Scale>" Then
            drawingviewname=ThisApplication.activedocument.ActiveSheet.drawingviews.item(1).Name
            otitleblock.setpromptresulttext(otextbox, ActiveSheet.View(drawingviewname).ScaleString)
        End If
    Next
Next
ThisApplication.ActiveDocument.Sheets.Item(ActiveSheet).Activate
InventorVb.DocumentUpdate()

 

I would like to ask some help. I can't understand how work this rule.

 

Thank the help.