This is weird, when I did this at the beginning all was fine, but I tried doing some other things (adding a suppression of the paint color in the form when set to default), and then the list went away?
But if I set the AssetLibraries.Item to (1) then all is fine again. But if I type in the name of the library, the list goes away until i pick the drop down?
Dim oApAssetNames As New List(Of String)
oApAssets = ThisApplication.AssetLibraries.Item("name of second library").AppearanceAssets
'oApAssets = ThisApplication.AssetLibraries.Item("AssetLibName").AppearanceAssets
For Each oApAsset As Asset In oApAssets
oApAssetNames.Add(oApAsset.DisplayName)
Next
Try
MultiValue.List("PAINT_COLOR") = oApAssetNames
Catch
Dim UPs As UserParameters = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters
UP = UPs.AddByValue("PAINT_COLOR", "", UnitsTypeEnum.kTextUnits)
MultiValue.List("PAINT_COLOR") = oApAssetNames
End Try
MultiValue.SetValueOptions(True)
MultiValue.UpdateAfterChange = True
If PAINT_TYPE = "DEFAULT" Then
PAINT_COLOR = "RAL7032_Pebble_grey"
SUPRESS_PAINT = "FALSE"
Component.Color("TRANSITION PATTERN") = PAINT_COLOR
Component.Color("ANGLE PATTERN") = PAINT_COLOR
Component.Color("ADAPTER") = PAINT_COLOR
Else
SUPRESS_PAINT = "TRUE"
Component.Color("TRANSITION PATTERN") = PAINT_COLOR
Component.Color("ANGLE PATTERN") = PAINT_COLOR
Component.Color("ADAPTER") = PAINT_COLOR
End If
Autodesk Certified Professional