Overview
This example VI demonstrates the method to programmatically create an Case Structure using VI Scripting.
Description
The need may arise within a program to update the values of a control such as an Enum or Ring Control during Run Time. In this case there are a couple of things to be aware of.
Firstly, this is possible by VI Scripting as can be seen here and here. Secondly, the method used to update the Text Ring as in this example can not be used for Enumerated Controls - this alone can be done by VI Scripting. In the following VI, a simple Property Node can be created from Right Clicking on the Text Ring Control in question. The property to be selected in this case is Strings[].
In this case, it is put in a little more context by the String Search functions used to populate it - this could be any string from any source.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi James,
Nice and useful job.
HL
I agree nice ... saved me some work
HI James, would you be so kind to save the file so it is compatible with Labview 2010?
great
Great job, James!
Is it possible to do the opposite? Create and populate an array of strings where each string is the case label.
Hi Eldiego,
You can probably do what you are asking by using the FrameNames property node. If you search in the example finder for 'scripting' and load the VI Scripting with Structures - Case Structure.vi it will show you various properites for case strucutres that you can get and set using VI scripting.
I hope this helps.
Nice, just used this for generating cases for a queued state machine. Thanks