How to assign values to a variable from a multivalue parameter - using iLogic

How to assign values to a variable from a multivalue parameter - using iLogic

Anonymous
Not applicable
352 Views
1 Reply
Message 1 of 2

How to assign values to a variable from a multivalue parameter - using iLogic

Anonymous
Not applicable

In my iLogic routine of work, I need help on the following:

Having created multivalue variable(s), I need to retrieve all or selectively retrieve some of data from the list(s) to assign to another variable(s). For example, suppose the list is xList = (23, 56, 76 92).How can I assign value of 56 (2nd value of xList) to another variable, say x. (x wil have have value of 56).

 

Pl. help.

0 Likes
353 Views
1 Reply
Reply (1)
Message 2 of 2

RoyWickrama_RWEI
Advisor
Advisor
One way of doing this is shown below: Imports Inventor.UnitsTypeEnum If ThisDoc.Document.DocumentType = kPartDocumentObject Then Try oChecker = ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.Item("TWL") MultiValue.SetList("TWL", 12, 75, 900) TWL=12 Catch ' oTWL=ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByValue("oTWL", 1, kcentimeterLengthUnits) oTWL=ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByValue("TWL", 1/10, kmillimeterLengthUnits) MultiValue.SetList("TWL", 22, 75, 900) TWL=12 End Try End If i = 0 For Each valueTWL In MultiValue.List("TWL") i = i+1 If i = 1 Then Thickness = valueTWL If i = 2 Then Width = valueTWL If i = 3 Then Length = valueTWL Next MessageBox.Show("Thickness: " & Thickness & vbCrLf & "Width: " & Width & vbCrLf & "Length: " & Length, "TWL") iProperties.Value("Project", "Description")= "PL." & " " & Thickness & " X " & Width & " X " & Length MessageBox.Show("DESCRIPTION: " & iProperties.Value("Project", "Description"), "Title") This is one of the methods. Many could have better solutions. I request post, if so. Thanks.
0 Likes