- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having problems with ilogic and multivalue lists. I need to use inventor to create a couple of parameters for our BOM list and our PDM system. For that i wanted to use a multivalue list, in combination with a form, to select the values wanted, and use the selection as parameters for the rest of the script.
I am not a programmer, and usually figure stuff out using google search, and copy paste, combined with a dose of logic and some basic scripting experience. However i have hit an ilogic wall.
I have managed to create multivalue lists using a centrally stored Excell file as input, using Multivalue.list . These generate just fine, and i can select a value in the user parameter screen, as well as a simple form I created by dragging the parameter on it. However, if i select a value, the result remains an empty parameter. I have tried several methods, including a popup screen to force an input from the multivalue list, however nothing works.
For one multivalue lists i need the drop down menu selection to fill in 3 other parameters, also from the same Excel file, which will be used in my script (later on, that part works perfectly) and is used as input for the BOM list.
The code itself is rather long and does a lot of different things. I will copy the part of the most 'complex' multivalue list that gives me trouble. Can anyone who can actually code please help me, and tell me what i do wrong?
I have also attached the source excel file.
Excuse the Dutch 🙂
Kind regards
Ben
Try test = oUserParams("MateriaalKeuze") Catch 'Aanmaken in geval van error oUserParams.AddByValue("MateriaalKeuze", "", kTextUnits ) End Try Try test = iProperties.Value("Custom", "EN-MaterialGroup") Catch 'Aanmaken in geval van error iProperties.Value("Custom", "EN-MaterialGroup")="" End Try Try test = iProperties.Value("Custom", "PBasisMat") Catch 'Aanmaken in geval van error iProperties.Value("Custom", "PBasisMat")="" End Try Try test = iProperties.Value("Custom", "EN-Code") Catch 'Aanmaken in geval van error iProperties.Value("Custom", "EN-Code")="" End Try MultiValue.List("MateriaalKeuze") = GoExcel.CellValues("P:\mechanical drawings\Inventor Standard\Profile Excel Data\Weldment materials.xlsx", _ "Weldment", "A2", "") Try test = oUserParams("oMatKeuze") Catch oUserParams.AddByValue("oMatKeuze", "", kTextUnits ) End Try 'oMatKeuze = InputListBox ("Select one:", MultiValue.List("MateriaalKeuze"), Parameter("MateriaalKeuze"), "iLogic", "List of Component Occurrences:") 'Parameter("MateriaalKeuze") = oMatKeuze 'MatiaalKeuze mag niet leeg zijn, anders geeft hij een error. If MateriaalKeuze = "" Then oMatKeuze = "-" Else oMatKeuze = MateriaalKeuze End If 'Zoek de waarde van MateriaalKeuze op, en vind daar met de andere kolommen de andere waardes bij. i=GoExcel.FindRow("P:\mechanical drawings\Inventor Standard\Profile Excel Data\Weldment materials.xlsx", "Weldment", "Name", "=", oMatKeuze) iProperties.Value("Custom", "EN-MaterialGroup") = GoExcel.CurrentRowValue ( "EN-Materialgroup") iProperties.Value("Custom", "EN-Code") = GoExcel.CurrentRowValue ( "EN-Code") iProperties.Value("Custom", "PBasisMat") = GoExcel.CurrentRowValue ( "PBasisMat")
Solved! Go to Solution.