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 =".............
Quick question... I have a file also that uses ilogic to update the extruded text in a file through a dialogue, I want to be able to control the text character spacing, is there a way I can achieve this?
The only software I know that allows for "kerning" is publishing software. Most Fonts have Kerning built into the Font. It's just having the correct software to access it. I don't know if you can copy text from something like InDesign into Inventor and retain any Kerning adjustments done in InDesign.
Unfortunately, copy-pasta of text into Inventor does not retain kerning. I've tried that.
This thread actually hits on two of the biggest items on my personal Inventor wish-list: text parameters working in iParts and manual kerning!
I didn't think it would as there is nothing in Inventor to hold the changed Kerning. Maybe convert the "Kerned" text to an image and treat it as a Decal
... except when you need to mill the text.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register