Public Sub CreateSimpleColorAppearance()
Dim doc As PartDocument
Set doc = ThisApplication.ActiveDocument
' Only document appearances can be edited, so that's what's created.
' This assumes a part or assembly document is active.
Dim docAssets As Assets
Set docAssets = doc.Assets
' Create a new appearance asset.
Dim appearance As Asset
Set appearance = docAssets.Add(kAssetTypeAppearance, "Generic", _
"MyShinyRed", "My Shiny Red Color")
Dim tobjs As TransientObjects
Set tobjs = ThisApplication.TransientObjects
Dim color As ColorAssetValue
Set color = appearance.Item("generic_diffuse")
color.Value = tobjs.CreateColor(255, 15, 15)
Dim floatValue As FloatAssetValue
Set floatValue = appearance.Item("generic_reflectivity_at_0deg")
floatValue.Value = 0.5
Set floatValue = appearance.Item("generic_reflectivity_at_90deg")
floatValue.Value = 0.5
Dim oAsset As Asset
Set oAsset = doc.AppearanceAssets("My Shiny Red Color")
doc.ActiveAppearance = oAsset
End Sub