Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I am trying to standardize the sketch symbols in the sketch library. I have a few questions.
- How can I change the text style in existing symbol so that it reads from a new style created in the styles library?
- Does changing the style in the style library update existing content? In my testing it does not, in this case how are people updating the contents? Manually?
- In the ilogic code below I can overwrite the style from the library by editing the local style of the sketch symbol but this does not affect the text box contents. How to change the textbox contents? To do this manually you need to manually window the text box and then select the font style and font size.
- Is it possible to update the sketch symbols in the library without placing in the drawing? The code below requires each one to be placed in the active sheet.
'https://forums.autodesk.com/t5/inventor-customization/ilogic-change-sketch-symbol-text-font/td-p/3503878 Dim oApp As Inventor.Application oApp = ThisApplication Dim oDoc As DrawingDocument oDoc = oApp.ActiveDocument Dim oSymbol As SketchedSymbol Dim oSymbols As SketchedSymbols Dim oSketch As DrawingSketch Dim oTextBox As Inventor.TextBox Dim oTextBoxes As TextBoxes Dim oSymDef As SketchedSymbolDefinition Dim oStyle As TextStyle oSymbols = oDoc.ActiveSheet.SketchedSymbols For Each oSymbol In oSymbols MessageBox.Show(oSymbol.Name, "Title") oSymDef = oSymbol.Definition oTextBoxes = oSymDef.Sketch.TextBoxes 'oSymDef.Edit(oSketch) For Each oTextBox In oTextBoxes oStyle = oTextBox.Style oText = oTextBox.Text MessageBox.Show(oText, "Title") oStyle.Font = "Arial Narrow" oStyle.FontSize = 0.16'Font in cm Next 'oSymDef.ExitEdit (True) Next
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan
Solved! Go to Solution.