I have been diving into the world of iParts, iLogic and iLogic Forms and have found them to be very useful! However, I am shocked to see that Text Height is NOT a parameter. The parts I am creating have embossed text. The size of parts range significantly so the size in text must also change. In making a Form, I would like the Text height to change based on the part being created. (ie if the part thickness is 1.5", I would like the text height to be 1" (Text Height = 66% of Part Thickness). I was about to create a simple iLogic rule to accomplish this when I noticed that Text Height (from the sketch) is nowhere to be found. Is there a work around for this? I have searched the web and some people suggest a macro or VBA (both of which I have never used).
Thank you in advance,
Solved! Go to Solution.
You can use this iLogic code to change the text height. It overrides the standard Style.
I created a part with a Sketch named "Text" and a parameter named "textToEmboss" that holdes the text i want to extrude/emboss.
Dim odoc As PartDocument
odoc = ThisApplication.ActiveDocument
Dim osketch As Sketch
'The used sketch name in the extrusion is Text
osketch.TextBoxes.Item(1).FormattedText ="<StyleOverride FontSize='0,5'>"+textToEmboss+"</StyleOverride>"
What if I want to add a condition to this iLogic? Where would I place this? For example, if Ring Diameter is 0.50 then the text size will be 0.375.
I changed the part with the condition (see attachment). You where on the right track when you wrote: if Ring Diameter is 0.50 then the text size will be 0.375.
This is the way to write a condition:
If parameter Diameter = 0.5 Then
Change the scale of the fontsize: osketch.TextBoxes.Item(1).FormattedText =".............
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.