Multivalue list for Text parameter

Multivalue list for Text parameter

wgraham
Advocate Advocate
540 Views
1 Reply
Message 1 of 2

Multivalue list for Text parameter

wgraham
Advocate
Advocate

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

0 Likes
Accepted solutions (1)
541 Views
1 Reply
  • API
Reply (1)
Message 2 of 2

wgraham
Advocate
Advocate
Accepted solution

Nevermind.  Figured it out text parameters need double quote