Hi @steveh3. Here is something that should at least point you in the right direction, if not be immediately useful. In testing, I found that I could not simply get the appearance from the component, then set that immediately to the welds, because it was throwing an error. So, I had to add in the bit of code for ensuring it is working with a 'local' (saved within the assembly document) version of the appearance. Then it worked as planned.
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kAssemblyDocumentObject Then
MsgBox("An Assembly Document must be active for this rule to work. Exiting.", vbCritical, "")
Exit Sub
End If
Dim oADoc As AssemblyDocument = ThisDoc.Document
If Not TypeOf oADoc.ComponentDefinition Is WeldmentComponentDefinition Then Exit Sub
Dim oWDef As WeldmentComponentDefinition = oADoc.ComponentDefinition
Dim oOccs As ComponentOccurrences = oWDef.Occurrences
Dim oWeldsOcc = oOccs.Item(1) '.Defintion is usually a WeldsComponentDefinition
Dim oOcc1 As ComponentOccurrence = oOccs.Item(2)
'MsgBox("oOcc1.Name = " & oOcc1.Name,,"")
Dim oOcc1App As Asset = oOcc1.Appearance
'make sure we are working with a local copy (saved within the assembly)
Dim oFound As Boolean = False
For Each oApAsset As Asset In oADoc.AppearanceAssets
If oApAsset.Name = oOcc1App.Name Or _
oApAsset.DisplayName = oOcc1App.DisplayName Then
oOcc1App = oApAsset
oFound = True
Exit For
End If
Next
If Not oFound Then oOcc1App = oOcc1App.CopyTo(oADoc)
'oWDef.WeldBeadAppearanceSourceType = AppearanceSourceTypeEnum.kOverrideAppearance
oWDef.WeldBeadAppearance = oOcc1App
'oWDef.WeldEndFillAppearanceSourceType = AppearanceSourceTypeEnum.kOverrideAppearance
'oWDef.WeldBeadMaterial
oWDef.WeldEndFillAppearance = oOcc1App
'oWDef.Welds.WeldBeads.Item(1).BeadFaces
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)