Thanks Jelte...
Inserted your code recommendation into my logic and getting an error...
'Define current document
Dim odoc As Document
Dim oCompDef As ComponentDefinition
odoc = ThisApplication.ActiveDocument
oCompDef = odoc.ComponentDefinition
Dim oviewrep As DesignViewRepresentation
Try
oCompDef.RepresentationsManager.DesignViewRepresentations.Item("Hi-Lited Welds").Activate
Catch
oviewrep = oCompDef.RepresentationsManager.DesignViewRepresentations.Add("Hi-Lited Welds")
'Activate new View Rep
oViewRep.activate
End Try
Dim doc As AssemblyDocument = ThisApplication.ActiveDocument
' set your collors/assets here
Dim assetOccurrences As Asset = doc.Assets.Item("Chestnut")
Dim assetWelds As Asset = doc.Assets.Item("Brass - Satin")
For Each occ As ComponentOccurrence In doc.ComponentDefinition.Occurrences
occ.Appearance = assetOccurrences
Next
Dim weldDef As WeldmentComponentDefinition = doc.ComponentDefinition
weldDef.WeldBeadAppearance = assetWelds
'Turn off ALL object visibility
ThisApplication.ActiveDocument.ObjectVisibility.AllWorkfeatures = False
ThisApplication.ActiveDocument.ObjectVisibility.ConstructionSurfaces = False
ThisApplication.ActiveDocument.ObjectVisibility.Sketches = False
ThisApplication.ActiveDocument.ObjectVisibility.Sketches3D = False
ThisApplication.ActiveDocument.ObjectVisibility.SketchDimensions = False
ThisApplication.ActiveDocument.ObjectVisibility.Annotations3D = False
If odoc.DocumentType = kAssemblyDocumentObject Then
ThisApplication.ActiveDocument.ObjectVisibility.WeldmentSymbols = True
ThisApplication.ActiveDocument.ObjectVisibility.Welds = True
End If
Think it has something to do with lines that set the colors...but I'm not good enough to decipher.
Again...Thanks so far. Getting closer 🙂
Steve Hilvers
Inventor Certified User / Vault Professional Influencer