- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello there,
I have been working with Inventor for some 3-4 years and now got the chance to aquire some experience in iLogic, which is a great tool i think and has a lot of potential.
I got some experience with mainly fortran and matlab, bute still don't get the syntax of ilogic or VB.NET.
I am trying to import excel lists and then depending on the user input writing data into iProperties, basically similar to an content center pik window.
If the user picked a value or data set <lookUp>, then i would need to search the array containing the first excel column for this data and get all the indices back, so I can show the options for the second pik from the second column.
Basically this works:
Dim MyArrayList As New ArrayList
MyArrayList.Add("daten 1")
MyArrayList.Add("daten 2")
MyArrayList.Add("daten 1")
MyArrayList.Add("daten 3")
lookUp = "daten 1"
jIndex = 0 'Index für die Index Liste Dim foundValuesIndicies As New ArrayList 'Leere Liste definieren 'Für jedes Element in vorhandener Liste durchsuchen For Each oItem In MyArrayList 'oItem ist der Inhalt der Zelle e.g. Bl 3 'Wenn der Inhalt der Zelle mit dem Suchwert übereinstimmt, dann zu Zeilen-Index Liste hinzufügen If oItem = lookUp Then foundValuesIndicies.Add(jIndex) End If jIndex = jIndex + 1 'Index zählen Next
but I would prefer to use FindAll to return the indices if possible:
Dim MyArrayList As New ArrayList MyArrayList.Add("daten 1") MyArrayList.Add("daten 2") MyArrayList.Add("daten 1") MyArrayList.Add("daten 3") lookUp = "daten 1"
Dim zIndex As New Object() = Array.FindAll(MyArrayList, Function(?) lookUp)
I don't understand the Function, I know you can specifiy one in VB.Net which does not seem to work in iLogic, probably as you are in the sub main. I don't understand the term predicate or likewise explanations either.
Any help is apreciated, thanks.
Solved! Go to Solution.