Message 1 of 7
iLogic Change Sketch Symbol Text Font
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
My iLogic ability is quite limited outside of what I use regularly, hopefully someone can help?
I am trying to change the font style in every text definition in all my sketch symbols in one go. Actually I have started it based on only a selection set but I would be happy with just all symbols too. Below is where I got to, I am stuck on the For Each line to cover each text box in the symbol. Some of the other syntax may not be right either but I can't test it all the way through.
Dim oDoc As DrawingDocument: oDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet: oSheet = oDoc.ActiveSheet Dim i As Long Dim oSymDef As SketchedSymbolDefinition: oSymDef = oDoc.SketchedSymbolDefinitions.Item(i) Dim oText As TextBoxes For i = 1 To oDoc.SelectSet.Count For Each oText In ............ oSymDef.TextBoxes.Item(i).FormattedText ="<StyleOverride Font='ARIAL'>...< /StyleOverride>" Next Next InventorVb.DocumentUpdate()
Also the XML style override is not complete if this is the only way to achieve this result.
Cheers,
Stew
Please mark as "Accept as Solution" if it answers your question or "Kudos" if you found it useful.
---------------------------------------------------------------------------------------------------------------------
Stew, AICP
Inventor Professional 2013, Autodesk Simulation Multiphysics 2013
Windows 7 x64 Core i7 32GB Ram FX2000
---------------------------------------------------------------------------------------------------------------------
Stew, AICP
Inventor Professional 2013, Autodesk Simulation Multiphysics 2013
Windows 7 x64 Core i7 32GB Ram FX2000