I am trying to write a script to generate a user event structure, and wire in the registered dynamic events into the dynamic events terminal. However, when I look for a property for the event case structure, there is no property or method to show dynamic events terminal.
How does one script the action of "show the dynamic events terminal"?
Solved! Go to Solution.
Unfortunately we don't have access to some event structure features, like dynamic event terminals, with scripting. However, you can always create the event structure w/ the features you'd like manually, save it to a VI, and then copy the structure to the intended diagram when needed.
Chris, I can understand why it is not there as it seems that there are things going on in the background of LabVIEW when event registration items are being wired into the event structure. Thanks for the tip.
No, it's just not there because no one has ever asked for it. The original scripting API was never planned out as a whole. It was built as various use cases arose. Features added to LV in LV 8.0 and later took scripting into account and generally created a scripting API as the feature was added, but features before that time have been retrofitted as requests come in.
Chris mentioned that you can copy in a structure from some template with dynanmic events terminal already configured. If you need to enable the terminal on an existing structure, you might try playing around with the Copy and Paste methods. If you have something selected when you do Paste, it gets replaced, and replacing one node with another will preserve as many wires as possible. You might have to paste again to put all the contents of the existing structure back into play. It's just an idea, not something I can say with certainty would work.
If the directly replacing does not work for you, it is usually easiest to connect to terminals on things like a structure by connecting them to control terminals on your template code. You can uniquely name these control terminals, making them easy to find. After you finish wiring to them, delete them. The wires remain connected to the terminals on the structure.