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

Hi @Darkforce_the_ilogic_guy

 

For a begining here is a code that changes a text box.. text. Asuming the text box is alone in the sketch and the said sketch is the second one of the part : 

 

Dim doc As Inventor.PartDocument = ThisApplication.ActiveDocument
Dim pcd As Inventor.PartComponentDefinition = doc.ComponentDefinition
Dim sk As Inventor.PlanarSketch = pcd.Sketches.Item(2)
Dim txtbox As Inventor.TextBox = sk.TextBoxes.Item(1)

Dim newText As String = "Testing"
Dim actualText As String = txtbox.Text
Dim fText As String = txtbox.FormattedText

sk.Edit
txtbox.FormattedText = fText.Replace(actualText, newText)

sk.ExitEdit

 

For the automation I would probably put the rule on the Open Document trigger. It would read the iProperty and put the value instead of the newText string. I guess you could accomplish that ?

Kind regards,

FINET L.

Kind regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill