User text parameters work with model states

User text parameters work with model states

michal.skubik
Explorer Explorer
216 Views
1 Reply
Message 1 of 2

User text parameters work with model states

michal.skubik
Explorer
Explorer
Hello, is it possible modify code bellow to work with model states? Any ideas?

Dim
oDoc As Document = ThisApplication.ActiveDocument Dim OComp As ComponentDefinition = oDoc.ComponentDefinition Dim oUPs As UserParameters = OComp.Parameters.UserParameters Dim oUP As UserParameter Dim xlsFile As String = "c:\_WORK_AV\Engineering\_Invdata\iLogic\Category.xls" GoExcel.Open(xlsFile, "Sheet1") Dim i As Integer = 2 Dim Param As String Dim List As IList Do Until i = 100 Param = GoExcel.CellValue ("A" & i) If Param = "" Then Exit Do List = GoExcel.CellValues("B" & i, "L" & i) Try Test = oUPs.Item(Param) Catch oUP = oUPs.AddByValue(Param, GoExcel.CellValue("B" & i), UnitsTypeEnum.kTextUnits) End Try MultiValue.List(Param) = List i = i + 1 Loop
0 Likes
Accepted solutions (1)
217 Views
1 Reply
Reply (1)
Message 2 of 2

dalton98
Collaborator
Collaborator
Accepted solution

Edit: You might have to change your way of going about it. Every parameter is shared on a model stated part/assembly. So, you would have to create a multi value parameter and assign its values to each model state. Your second parameter that is already a multi-valued is not possible as far as I know.

0 Likes