Hi MisterZS,
I'm not aware of a way to add a list to the BOM editor, but you might be able to do it using a custom form. I won't have time to look at this any time soon, but here are some snippets that might help someone else if they get a chance to help.
These snippets get the list of materials from Excel, reading from row 2 to the last used row (assuming the list isn't longer than 10000 rows).
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
'get list from XL using an arraylist
'define the XLS to look at
myXLS = "U:\iLogic examples\XLS lookup\Mat Library.xls"
GoExcel.Open(myXLS)
'index row 2 through 10000
For rowNumber = 2 To 10000
'find first empty cell in column A
If (GoExcel.CellValue("A" & rowNumber) = "") Then
' If (GoExcel.CellValue(myXLS,"Sheet1", "A" & rowNumber) = "") Then
'create a variable for the row that is one row less than the first empty row found
'this assumes the first empty row is the end of the list
lastUsedRow = rowNumber - 1
Exit For
End If
Next
'set the list to be read from the XLS file
Dim myArrayList As New ArrayList
i = 2
'add the values from the Excel file to an array list
Do until i = lastUsedRow +1
myArrayList.add(GoExcel.CellValue("B" & i))
i = i + 1
Loop
'present the list to the user
myMatl= InputListBox("Select from the list", myArrayList, myArrayList.Item(0), "iLogic", "Available Materials")
'set the iProperty
iProperties.Value("Project", "Description") = myMatl
'present the result
MessageBox.Show("The Description is: " & iProperties.Value("Project", "Description"), "iLogic")
OR
'get list from XL using an existing multi value parameter list
'define the XLS to look at
myXLS = "U:\iLogic examples\XLS lookup\Mat Library.xls"
GoExcel.Open(myXLS)
'index row 2 through 10000
For rowNumber = 2 To 10000
'find first empty cell in column A
If (GoExcel.CellValue("A" & rowNumber) = "") Then
'create a variable for the row that is one row less than the first empty row found
'this assumes the first empty row is the end of the list
lastUsedRow = rowNumber - 1
Exit For
End If
Next
'add the values from the Excel file to the list
MultiValue.List("Material_List") = GoExcel.CellValues(myXLS, "Sheet1", "B2", "B" & lastUsedRow)
'present the list to the user
myMatl= InputListBox("Select from the list", MultiValue.List("Material_List"), MultiValue.List("Material_List").Item(0), "iLogic", "Available Materials")
'set the iProperty
iProperties.Value("Project", "Description") = myMatl
'present the result
MessageBox.Show("The Description is: " & iProperties.Value("Project", "Description"), "iLogic")
