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?

<p>  'Get display state</p><p>  Set swDSS = swModelDocExt.GetDisplayStateSetting(swDisplayStateOpts_e.swAllDisplayState)</p><p>  swDSS.Entities = swComponents</p><p>  swDSS.Option = swDisplayStateOpts_e.swSpecifyDisplayState</p><p>  displayStateNames(0) = "Display - Seed"</p><p>  swDSS.Names = displayStateNames</p><p>  'Assembly level is the default</p><p>  swDSS.PartLevel = False</p><p>  </p><p>  'Change the selected component's assembly-level color in the specified display state; this is the overriding color level</p><p>  appearances = swModelDocExt.DisplayStateSpecMaterialPropertyValues(swDSS)</p><p>  Set swAppearanceSetting = appearances(0)</p>

Any thoughts are appreciated.

Dave

SolidworksApi macros