06-11-2025 10:44 PM
Working in LV2020...
I have the following scripting code in order to insert a new frame into a case structure.
It works great... except LabVIEW doesn't realize it.
The target VI is broken with the following error:
Thing is, it's there. Correct selector value and everything.
If I edit the case selector by adding a space and then deleting it, the VI fixes itself.
If I add one, then a second, then delete the second one, then the VI fixes itself
(so clearly nothing is actually WRONG with the first one I created)
Any Ideas what's going on?
NOTE: I did used to have Begin/Add Undo Transaction but the "dirty dot" never appeared, and I've been trying to simplify it down to the absolute minimum number of functions.
NOTE: The VI (or Block Diagram) being open and visible does not affect the behavior.
Solved! Go to Solution.
06-12-2025 03:54 AM
Hi,
It seems like a bug of CaseStructure property "FrameNames" that does not properly recompile the VI.
Try forcing recompilation with VI method "Compile":
I managed to reproduce a similar behavior, but not exactly what you described.
Please attach code or at least provide more details on the selector data type (boolean, integer, enum ?) and the exact values written to "FrameNames".
Regards,
Raphaël.
06-13-2025 05:09 AM
Those frame names are tricky.
If the case uses strings, you might need to quote the string, like the case structure does when you type a string.
For enums, you shouldn't quote the strings, as the case structure doesn't do that when you type the enum names...
It's quite crude. It would be nice to have functions that return actual data in stead of literal strings.
Not sure if that's what's going on. So code would indeed help.
06-13-2025 04:19 PM
Here is what I find:
Note that there are always leading and trailing spaces.
06-17-2025 08:45 AM
Wiebe (and future readers),
At your recommendation, I tried adding quotes and even adding spaces before/after quotes.
Neither worked (at least in 2020)
The VI Compile solution did seem to work though.
Thanks for your input.
-- Rob
06-17-2025 08:59 AM
Here's the testbench I was using to experiment.
The compile seems to do the trick.
I have not tried this on any version other than 2020.
__PRESENT
06-20-2025 10:08 AM - edited 06-20-2025 10:09 AM
@10Things_Rob wrote:
Here's the testbench I was using to experiment.
The compile seems to do the trick.
I have not tried this on any version other than 2020.
__PRESENT
I have tried with LV2024 Q3 64bit and the issue is still there.
Since you've most likely found a bug and a way to reproduce it, I would suggest to report it to NI.
You can simply give them a link to this forum thread so that you don't need to repeat all the steps to reproduce the bug.
Regards,
Raphaël.
06-20-2025 11:09 AM
Done. Thanks.
__PRESENT