Dave Posted June 13 Report Share Posted June 13 Can someone help me out to understand how to use the Lists feature found in the solution explorer. I don't see anything in the help files. I can see that there are many types of Lists available, and I can easily create Lists, but I don't see where/how to actually use or reference the List(s), once created. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted June 13 MVP 2022 Report Share Posted June 13 I didn't know about this one, so I went digging. There are so many hidden nuggets in UniLogic! There is some information about Lists in the Help under "For" Loops, specifically as an input argument in the "For Each" function block. I couldn't find an example on them. Any input from the Creators on how this works? Joe T. Quote Link to comment Share on other sites More sharing options...
curtharrington1 Posted June 13 Report Share Posted June 13 The lists are used for the new "for each" loop features: search for "Loop functions" in the help files for info Quote Link to comment Share on other sites More sharing options...
curtharrington1 Posted June 13 Report Share Posted June 13 13 minutes ago, Joe Tauser said: I didn't know about this one, so I went digging. There are so many hidden nuggets in UniLogic! There is some information about Lists in the Help under "For" Loops, specifically as an input argument in the "For Each" function block. I couldn't find an example on them. Any input from the Creators on how this works? Joe T. You can use lists as an argument for the "for each" loop without having to manage the max iterations of a typical for loop. Here is a quick example of the for each with a list: Current Item tag is a local tag similar to this C example: bool list[10]; int PE_Active = 0; // INT16 in UniLogic for (int index = 0, index <= MAX_INDEX; index++){ if(list[index] == true){ PE_Active += PE_Active + 1; } } Quote Link to comment Share on other sites More sharing options...
Dave Posted June 13 Author Report Share Posted June 13 OK. thanks. This brings up a new topic now...Combo Box list of text source I was hoping I could utilize the "Lists" with combo boxes somehow...I would like to have the "Options: List" collection of a combo box be sourced from a dynamic list, or data table column of strings. Currently, the list for the combo box is fixed and can't be changed thru program code or operator entry. I wonder if it's possible to somehow link a data table column of strings, or a list of strings to a Combo Box or "List of Text Variable" Quote Link to comment Share on other sites More sharing options...
Rivka Posted June 14 Report Share Posted June 14 Thank you @curtharrington1 for clarifying the feature. It is indeed a new feature that was introduced, along with the "for" and "while" loops. It is worth having a look at them! About the feature request on the dynamic combobox, that could be a nice feature. I'll open a feature request on it. Have a good day! Rivka Quote Link to comment Share on other sites More sharing options...
Rivka Posted August 7 Report Share Posted August 7 Dear @Dave, Your request had been added to the roadmap! (will probably appear in UniLogic 1.35) Thanks for the proposition! Rivka Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.