Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm just beginning iLogic and I've managed to create a rule that imports cross section and inner diameter of ISO3601 metric o-rings from an excel spreadsheet. The code creates the 2 user parameters and a corresponding multi value list for each.
However, the values are not linked to each other as they should be. e.g. A 0.74 ID O ring should be limited to a 1.02 cross section only but I can pick any cross section available in my list and vice versa. Is there some way to link the values together when I import them?
Here is my code and a portion of the excel spreadsheet I'm using:
oDoc.ComponentDefinition
Dim oUPs As UserParameters = oComp.Parameters.UserParameters
Dim oUP As UserParameter
'Set excel filename
Dim xlsFile As String = "C:\Users\domin\OneDrive\Documents\Inventor\iLogic\ISO3601 Metric O Rings.xlsx"
GoExcel.Open(xlsFile, "Sheet1")
oColumn = "B"
oRow = 1
Param = "Start"
Dim List As IList
Do Until Param = ""
oCell = oColumn & oRow
Param = GoExcel.CellValue(xlsFile,oSheetName,oCell)
If Param = "" Then Exit Do
List = GoExcel.CellValues(oColumn & oRow+1,oColumn & oRow+6)
Try
Test = oUPs.Item(ParamName).Value
Catch
oUP = oUPs.AddByExpression(Param, GoExcel.CellValue(oColumn & 2), UnitsTypeEnum.kMillimeterLengthUnits)
End Try
MultiValue.List(Param) = List
'Set the next column
oColumn = Chr(Asc(oColumn)+1)
Loop
Solved! Go to Solution.