Function SetPromptValue(ByVal fBlock As TitleBlock, _
ByVal fPrompt As String, _
ByVal fValue As String)
'Changes the value of prompted entry in the title block
On Error Resume Next
Dim oTextbox As Inventor.TextBox
Dim oTextBoxes As Inventor.TextBoxes
Dim sData As String
Set oTextBoxes = fBlock.Definition.Sketch.TextBoxes
For Each oTextbox In oTextBoxes
sData = Trim(fBlock.GetResultText(oTextbox))
If InStr(oTextbox.FormattedText, fPrompt) Then
Call fBlock.SetPromptResultText(oTextbox, fValue)
End If
'MsgBox oTextbox.Text & " > " & sData
Next
On Error GoTo 0
End Function
Public Sub prompt_fill
Dim oDoc As Inventor.Document
Set oDoc = ThisApplication.ActiveDocument
Dim act_sheet As Sheet
Set act_sheet = oDoc.ActiveSheet
Dim tbdef As TitleBlock
Set tbdef = act_sheet.TitleBlock
SetPromptValue tbdef, "Maßstab", "Irgendwas"
End Sub
------------------
"Das Motto des Tages"
Wir hatten nie 'ne Schulung in Inventor
Wir hatten nie 'ne Schulung in Methodik
Wir haben keinen Wartungsvertrag
Wir haben keinen Admin
Wir haben trotzdem Spaß!
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP