- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Anyone can help me to get the right code below, i cant change text color at drawing Sketch Symbol like the picture.
Public Sub EditSymbols()
Dim odoc As DrawingDocument
Set odoc = ThisApplication.ActiveDocument
Dim osymb As SketchedSymbolDefinition
Dim oColor As Color
Set oColor = ThisApplication.TransientObjects.CreateColor(0, 0, 0)
oColor.ColorSourceType = ColorSourceTypeEnum.kLayerColorSource
Dim oText As TextBox
Dim x As Long
x = 0
Dim y As Long
y = 0
For Each osymb In odoc.SketchedSymbolDefinitions
x = x + 1
Set osymb = odoc.SketchedSymbolDefinitions.Item(x)
Dim oSketch As DrawingSketch
Call osymb.Edit(oSketch)
For Each oText In osymb.Sketch.TextBoxes
y = y + 1
Set oText = osymb.Sketch.TextBoxes.Item(y)
oText.Color.ColorSourceType = ColorSourceTypeEnum.kLayerColorSource
Next
y = 0
osymb.ExitEdit (True)
Next
End Sub
Autodesk Inventor Professional Certified 2014
Solved! Go to Solution.