Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have cobbled together some iLogic code which formats text, sets justification etc in part (.IPT) sketches.
I can't seem to get any of the code to toggle on or off the textbox button.
How can I add to / vary the code sample below to either enable or disable the textbox button?
Dim oPartDoc As PartDocument oPartDoc = ThisDoc.Document Dim oCd As ComponentDefinition oCd = oPartDoc.ComponentDefinition Dim oTextbox As TextBox Dim oSketch As PlanarSketch Dim oColor As Color = ThisApplication.TransientObjects.CreateColor(128, 0, 128) For Each oSketch In oCd.Sketches For Each oTextbox In oSketch.TextBoxes 'write formatted text oText = oTextbox.Text oTextbox.Color = oColor oTextbox.HorizontalJustification = HorizontalTextAlignmentEnum.kAlignTextCenter oTextbox.VerticalJustification = VerticalTextAlignmentEnum.kAlignTextMiddle oTextbox.WidthScale = 1 oTextbox.FormattedText = "<StyleOverride Font='Tahoma' FontSize='0.35' Bold='False' Italic='False' Underline='False'>" & oText & "</StyleOverride>" Next Next iLogicVb.UpdateWhenDone = True
Any help or advice greatly appreciated!
Many thanks,
Gareth 😀
Solved! Go to Solution.