From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Overview
This example VI demonstrates the method to programmatically create an Enum using VI Scripting.
Description
The VI first creates a new VI at the path selected by the user in the File Dialog. It then opens a reference to the Block Diagram of this new VI and feeds this into a New VI Object function that creates an Enum Constant. This constant is then populated with the items from the String Array Control.
Once it has done this, and closed off the references, it saves the changes to the VI and then opens it for you to view.
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.
Thank you very much!
James_W,
WoW! - I developed an idea that would allow an ENUM to be used for accessing the correct constant in a meaningful way, thought "this would be great for a script, if I knew how" and actually found the answer on NI's site - FANTASTIC!!!
HOWEVER! - The criminal/evil Wallmart Money-Grubbing mentality has struck again:
o Despite insane SW prices that prevent me from owning up-to-date LV at home, NI refuses to provide reliable support
o My employer will not provide up-to-date LV at work
o You did not provide an example I can use with LV 2010
ThanX?
1ERC
Hi 1ERC,
I'm sorry that you've had difficulty getting support from NI engineers but, despite what my profile on here might say, I'm no longer an NI employee so can't really do anything to help you there. I have, however, added a version of the code saved for LV2010 so hopefully you'll now be able to try out the example.
Regards,
James
ThanX James,
After I wrote the nastyGram from exasperation, I was able to re-create the Script from the fuzzy picture and IT WORKED! I will compare it to your kind 2010 ENUM Script.
ThanX again and best regards,
1ERC
This help me a lot to create a beautiful polymorphic vi.
Thank you very much!