iLogic InputListBox

iLogic InputListBox

Stryder33345
Enthusiast Enthusiast
2,603 Views
5 Replies
Message 1 of 6

iLogic InputListBox

Stryder33345
Enthusiast
Enthusiast

Hi,

  I was wondering if there was a way to have a InputListBox that you can choose multiple values from the list ?

 

 

 

Inventor 2016 

 

Thanks in advance Ben

0 Likes
Accepted solutions (1)
2,604 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Yes, you need to make the parameter a Multi-Value.

In the partameters dialog right click the parameter you want to modify and choose "Make Multi-Value"

Another dialog will appear to add more values.

Now when you drag and drop to add that parameter to your iLogic form it will be a Multi-Value drop down box.

You can also choose to make the control a list box or a radio group through the form editor.

Good luck!

 

EDIT: After reading your question again I'm not sure I answered correctly. I'm not sure about the ability to choose multple values from the list.

0 Likes
Message 3 of 6

MechMachineMan
Advisor
Advisor

Ken was somewhere along the right line;

 

You can create a list or a collection or array within the code and use that within your InputListBox. ie;

 

Dim oList As New List(Of String)

 

Dim oParameter As Parameter

oModelP = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.ModelParameters

 

For Each oParameter in oModelP
If oParameter.Renamed=True
oList.Add(oParameter.Name)
End If
Next


r = InputListBox("Prompt", oList, "", Title:= "Select Parameters", ListName := "Parameters")

MsgBox(r)


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 4 of 6

Stryder33345
Enthusiast
Enthusiast

Creating the list is fine, I just want to be able to select more than one value from the list to run another rule on each selection.

The list can be quite long sometimes as well, because it is coming from excel and differs each time the rule is run. Maybe I will have to use something other than an 'inputlistbox' any ideas?

 

Thanks for your help so far though fellas.

0 Likes
Message 5 of 6

MechMachineMan
Advisor
Advisor
You can always have the list in a while loop and have it repopulate to allow it to run multiple times/have multiple selections

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 6 of 6

Stryder33345
Enthusiast
Enthusiast
Accepted solution

a 'goto' statement for now will have to do, but thanks for the help

0 Likes