- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hoping someone can point me in the right direction. Trying to build a text parameter that contains a multivalue list via the api. Below is sample code. User1 creates a parameter and multivalue list as expected. User2 creates the parameter and gives a dropdown, but doesn't containt any values. Assuming I'm missing something fairly simple at this point, but can't get it to work.
Sub MultiListTest()
Dim doc As PartDocument
Set doc = ThisApplication.ActiveDocument
Dim x(1) As String
x(0) = "2 in"
x(1) = "3 in"
Dim user1 As UserParameter
Dim user2 As UserParameter
Set user1 = doc.ComponentDefinition.Parameters.UserParameters.AddByExpression("TestLength", "1 in", UnitsTypeEnum.kInchLengthUnits)
Call user1.ExpressionList.SetExpressionList(x)
Set user2 = doc.ComponentDefinition.Parameters.UserParameters.AddByValue("TestText", "1 in", UnitsTypeEnum.kTextUnits)
Call user2.ExpressionList.SetExpressionList(x)
End Sub
Solved! Go to Solution.