A recent question on the Facebook group asked about an inputbox with a dropdown menu. While iLogic does support dome dropdowns, its limited to multi-line parameters. This means if for example you wanted to list out your parts into a selection for a user input, you would need to create a parameter and add each object to a multi list. This is of course do-able but not good practice. There is overhead that you need to include like deleting any existing entries first. If only there was a control that could be used..... Well there is now, the NachoInputBox.
This tool is easy to reference and use with little effort. Furthermore, you wouldnt need any overhead as its called on-demand. You can find this tool in the Shop but dont worry, its free to download and use. Click here to get it
Usage
First you need to add a reference to the dll. Store it in a place that is not project specific like your iLogic folder.
AddReference "C:\PathToFile\NachoInputBox.dll"
For this example, i am going to use a static list but you can also do things like loop an assembly or BOM to get the part / component that need. NachoInputBox received a List(of String)
Dim valList As New List(Of String) From {
"part1.ipt",
"part2.ipt",
"part3.ipt"
}
An alternate method to populate the list is like this
Dim valList As New List(Of String)
for Each RefDoc As Document in oAsmDoc.AllReferencedDocuments
valList.Add(RefDoc.DisplayName)
Next
Create a title for the InputBox. I prefer to create it first as a string
Dim InputboxTitle As String = "A New title"
Then you need to instantiate the NachoInputBox
Dim nInputBox As New NachoInputBox.NachoInputBox(valList, InputboxTitle)
This will call the NachoInputBox with the list in the dropdown. Press cancel, you'll cancel the event. Press OK, the selected value is returned to nInputBox and you just need to get the result
Dim res As String = nInputBox.Result
And thats it! A simple solution to get an InputBox with any values you want