Change component color in SolidWorks 2013

All,

Is there a way to set a component color of a display state using data from the "GetDisplayStateSetting" method?

  'Get display state

  Set swDSS = swModelDocExt.GetDisplayStateSetting(swDisplayStateOpts_e.swAllDisplayState)

  swDSS.Entities = swComponents

  swDSS.Option = swDisplayStateOpts_e.swSpecifyDisplayState

  displayStateNames(0) = "Display - Seed"

  swDSS.Names = displayStateNames

  'Assembly level is the default

  swDSS.PartLevel = False

 

  'Change the selected component's assembly-level color in the specified display state; this is the overriding color level

  appearances = swModelDocExt.DisplayStateSpecMaterialPropertyValues(swDSS)

  Set swAppearanceSetting = appearances(0)

Any thoughts are appreciated.

Dave

SolidworksApi macros