01-09-2018 07:51 AM
I can successfully create and populate a case structure using labview scripting. However, the frames each have a string label. How do I set each case to be a number, not a string? The only applicable property node I can find is CaseSel->FrameNames, but that expects an array of strings, and therefore the resulting case structure switches on "0", "1", "2", etc. instead of 0, 1, 2 (i.e. strings instead of numbers).
I am programatically creating other code as well, including a subtraction function, the output of which is connected to the case selector terminal (in other words, I've ensured I have something that produces a number - not a string - wired to the case selector).
Thanks in advance for any help
Solved! Go to Solution.
01-09-2018 08:24 AM
nevermind...figured it out.
for anyone who is interested - if you have an array of integers, and then convert it to a string array and pass that string array to the FrameNames input of the CaseSel method, it will create the case struct as a struct of ints.
01-10-2018 11:50 AM
In more general terms:
The FrameName strings except everything that is allowed to be typed in manual. So what LabVIEW shows in there when you edit them manually, you can put in there with scripting. With integers for example, ..1 is valid, or 2.., or 1..6, 7..10, default. That's the way it is, and it's not always easy. Parsing back those FrameNames can be difficult, especially when supporting Strings, Integers, Errors and Enums.
Please consider selecting a (your own reply) solution, or everyone will open this post to see if they can help assuming your still looking for a solution.
05-03-2019 12:13 PM
Do you have any example code?