LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
David_L

Configure Event Case with Scripting

Status: Completed
Available in LabVIEW 2013

Currently with LabVIEW Scripting you can very easily create an event structure and add new event cases to the event structure.    Unfortunately, for some reason, you cannot programmatically configure the event case after it's created.  I think there should be some way, via property nodes, invoke nodes etc, to accomplish this.

 

idea.png

 

PS..  I would love to be wrong about this.  If you know of how to do that, feel free to argue it in the comments and we'll get this closed as completed 😄

16 Comments
Darren
Proven Zealot

There are scripting methods for the Event Structure that allow you to create/remove/duplicate frames, and also set the handled events on a particular frame. See the following shipping example for more info:

 

examples\Application Control\VI Scripting\Structures\VI Scripting with Structures - Event Structure.vi


You can scroll to the right on that example diagram to see additional methods.

 

Don't forget to enable Tools > Options > VI Server > Show VI Scripting functions, properties, and methods to see all the available properties/methods/classes for scripting.

parthabe
Trusted Enthusiast

This is what I'm seeing currently in my LV 2014. But, should it not show up the Frame's Color property instead of the Diagram's Color property?! Or, am I getting something wrong?? Please see below.

 

 

VI Scripting with Structures Event Structure.vi - Missing 'Frame' Property.jpg

 

 

 

- Partha ( CLD until Oct 2024 🙂 )
Darren
Proven Zealot

To my knowledge, there is no way to change the color of any structure in scripting.

AristosQueue (NI)
NI Employee (retired)

> To my knowledge, there is no way to change the color of any structure in scripting.

 

And even if there were, that would be a structure setting, not a frame setting. The only place where indiv frames have color separation is the case struct wired with error, which is rendered as a special case.

parthabe
Trusted Enthusiast

I think I should have been more clear with my query...

 

When we connect the Frame's Reference (Add/Duplicate Frame Ref) to a Property Node, why are we not getting the Frame's properties, but instead, getting the Diagram's properties?

 

I think that is the exact query posted by the OP David_L.

- Partha ( CLD until Oct 2024 🙂 )
AristosQueue (NI)
NI Employee (retired)

There are no properties for a frame. Frame isn't a class in our VI hierarchy outside of the sequence structures where they are independent elements. The diagrams are the frames.

(This is true in the C++ code class hierarchy as well, not just the G hierarchy.)