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

Here is it :

Public Sub Title_block_scale_insertion(sProperty As String, oSheet As Sheet)
    'insert the scale of the first view of a sheet
    Dim oTextBox As Inventor.TextBox
    If oSheet.DrawingViews.Count > 0 Then
        For Each oTextBox In oSheet.TitleBlock.Definition.Sketch.TextBoxes
            If oTextBox.FormattedText = sProperty Then
                Call oSheet.TitleBlock.SetPromptResultText(oTextBox, Replace(Replace(oSheet.DrawingViews(1).ScaleString, ":", "/"), " ", ""))
            End If
        Next oTextBox
    End If
End Sub

Guillaume MASSART
AFFIVAL SAS
Inventor Pro 2022
EESignature