need helping searching thru multiple lists...

need helping searching thru multiple lists...

leonard.bordian
Participant Participant
531 Views
6 Replies
Message 1 of 7

need helping searching thru multiple lists...

leonard.bordian
Participant
Participant

greetings everyone... i need some help and i'm not sure how to proceed.

 

below, i have multiple lists...

 

LIST01 - 143T,L143T,145T,L145T
LIST02 - 182T,L182T,184T,L184T
LIST03 - 213T,L213T,215T,L215T
LIST04 - 254T,256T
LIST05 - 284TS,284T,286TS,286T
LIST06 - 324TS,324T,326TS,326T
LIST07 - 364TS,3645T,364T,365T
LIST08 - 404TS,405TS,404T,405T
LIST09 - 444TS,445TS,444T,445T,445T

 

and when i have an item selected from a list; eg... Motor = 256T, i need iLogic to search the above lists, then i need iLogic to tell me which list 256T is in...example... MotorList = LIST04

 

from the value returned, i will have my iLogic go to my Excel file and read the values from 'Sheet4'. i know how i will proceed from here. i'm just not sure how to get the value i'm looking for.

 

any help is greatly appreciated

thanks

 

-Leonard

 

 

0 Likes
Accepted solutions (1)
532 Views
6 Replies
Replies (6)
Message 2 of 7

frederic.vandenplas
Collaborator
Collaborator
XML is a perfect way to handle this kind of data.
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
0 Likes
Message 3 of 7

leonard.bordian
Participant
Participant

i'm sorry... i don't know how to write for XML

 

0 Likes
Message 4 of 7

MechMachineMan
Advisor
Advisor

More information is required to help you at all.

 

Why with hold information and keep us guessing, delaying your time until a solution when you can provide us with information up-front?

 

How much experience do you have with iLogic/programming?

 

Where is code of things you have tried?

 

How are the lists stored?

 

Have you used the iLogic GoExcel feature? (I suggest you try doing this before you report back and get an understanding of how it works).

 

Where are you returning that value from excel to? A parameter, an expression? 

 

etc...


--------------------------------------
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 5 of 7

leonard.bordian
Participant
Participant

i apologize if i wasn't clear or if i didn't supply enough information. as for code, i wasn't sure how to proceed which is why i posted my original post

i tried to keep my original question very simple to avoid any confusing. as for my iLogic experience, i have some but i am not as advanced as most people here.

 

Motor = 256T ''user selected parameter from another MultiValue.List

 

here i need to search from the list below for the value = 256T (i don't know what to correctly write in iLogic to do this)

 

LIST01 = MultiValue.List("143T,L143T,145T,L145T")
LIST02 = MultiValue.List("182T,L182T,184T,L184T")
LIST03 = MultiValue.List("213T,L213T,215T,L215T")
LIST04 = MultiValue.List("254T,256T")
LIST05 = MultiValue.List("284TS,284T,286TS,286T")
LIST06 = MultiValue.List("324TS,324T,326TS,326T")
LIST07 = MultiValue.List("364TS,3645T,364T,365T")
LIST08 = MultiValue.List("404TS,405TS,404T,405T")
LIST09 = MultiValue.List("444TS,445TS,444T,445T,445T")

 

MotorList = LIST04 (this a parameter the value will be written to from the above search)

 

once i can get a value for the parameter = MotorList, i can proceed with the other code that i have.

 

thanks

 

 

0 Likes
Message 6 of 7

MechMachineMan
Advisor
Advisor
Accepted solution

So you would be fine with these lists hardcoded into the iLogic/vb.net solution and not fetched from anywhere? (Easiest way, IMO)

 

If so I would suggest using lists. It will look SOMETHING like below (which is mostly pseudocode)

 

Sub Main()
SetClassificationParam("MTL56")
End Sub



Sub SetClassificationParam(oSearchVal As String) 'oList1 will be named "Motor list" Dim oList1 As New List(of String) oList1.Add("MTL56") oList1.Add("MTL72") Dim oList2 As New List(of String) oList2.Add("MTL23") oList2.Add("MTL24") If oList1.Contains(oSearchVal) oReturnParam = "Motor List") Else if oList2.Contains(oSearchVal) oReturnParam = "Chassis List" End if Param.Partemer("Classification") = oReturnParam End Sub

--------------------------------------
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 7 of 7

leonard.bordian
Participant
Participant

thank you so much!! this looks like what i may need. i will try this out later and let you know if i can get this to work

 

i'm sorry for not replying sooner

 

best regards

0 Likes