List type custom property change problem

Image "SW Model View"

I have a problem were I cannont update a custom properties on the right side of the picture that are drop down lists, such as property "Material Form" (Variable name "MaterialForm-2013"). They are lists style custom properties with custom values allowed, so if one clicks in the box one can enter any text one wants or select a value from the drop down list.

Image "SW Custom Properties View"

This shows the custom properties and thier variable names.

Below is the code I have used to try and edit the custom properties.

  • It works for "Thisckness-2013"
  • It does not work for "MaterialForm-2013"

Does anyone know how I can get it to work on the lists style properties?

SW 2010 X64 SP5.0

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Sub main()

Set swApp = Application.SldWorks

Set swModel = swApp.ActiveDoc

Set swConfig = swModel.ConfigurationManager.ActiveConfiguration

Set swCustPropMgr = swConfig.CustomPropertyManager

' Set custom Properties

    swCustPropMgr.Set "MaterialForm-2013", "Profile"

    swCustPropMgr.Set "Thickness-2013", Chr(34) & "Thickness@Sheet-Metal1@" & swModel.GetTitle & ".SLDPRT" & Chr(34) & "mm"

swModel.ForceRebuild3 True

End Sub

SolidworksApi macros