Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Rich-T
208 Views, 1 Reply

Link Text Height of an Emboss Feature to a parameter

Hi,

I've got a head scratcher.

 

I have an emboss feature with 10 text boxes in the sketch. I want to be able to link the font size of all of the text boxes to a control parameter. I've got the code below but it doesn't work and doesn't seem to update the emboss feature either.

 

Dim oPartDoc As PartDocument
oPartDoc = ThisDoc.Document

Dim oCompDef As ComponentDefinition
oCompDef = oPartDoc.ComponentDefinition

Dim oSketchText As Inventor.TextBox
Dim oSketch As PlanarSketch
Dim oFontSize = text_height / 10

For Each oSketch In oCompDef.Sketches
	For Each oSketchText In oSketch.TextBoxes
		oSketchText.FormattedText = "<StyleOverride FontSize = '" & oFontSize & "'>" & "</StyleOverride>" 
	Next
Next

iLogicVb.UpdateWhenDone = True

 

 

 

Any help would be gratefully received.