How do I create a search button for various screens within the project?
I want a way to add the search functionality for my HMI project to be able to search for screens with keywords.
For example.
If I have 10 screens, and I type a keyword or a sentence that matches with text on that screen, it shows up in the list and the user can click and navigate to it.
The best way to do this would be to create a manual âdatabaseâ (could just be a python dictionary or other data structure) within the project somewhere that can then be iterated through looking for a particular term. The only project-wide window resource you can access in the runtime is names (system.gui.getWindowNames()), so you wouldnât be able to store this attribute on each window dynamically - but this would be easy to store as a project script.
Okay. That makes sense. Another thing I was thinking about was â
Have a dictionary to store keywords associated with each screen, and build that database over time based on how they are using it. So for example - if someone wants to search âHow do I do task Aâ , all screens that may have the keyword Task A would show up as the search result.
Would that be possible?
Claus - I donât know, would you recommend using that? The goal is for the operator to be able to find screens related to their task, in case they want to do a search.