LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
TurboPhil

VI Activation Event should return VI Reference

The left data node in the VI Activation event should include a reference to the VI that was activated.

 

ViActivationEvent.png

 

 

This event proves very useful as a workaround for other LV flaws--namely, that you can't register for FP control events before the FP is opened--so we often wait until a VI is activated before we attempt to register for generic control interaction events. But, since we don't actually have a reference to the VI, we have to use the VI name to obtain a reference. And then there is always the question of what "VI Name" will mean when dealing with namespaced (library member VI) or clone instances...

3 Comments
AristosQueue (NI)
NI Employee (retired)

> And then there is always the question of what "VI Name" will mean

> when dealing with namespaced (library member VI) or clone instances...

 

Question? What question? It's the name of the VI, fully qualified everytime, with the clone number included if it is a clone. Why is this a problem?

 

We do not provide a VI refnum for performance reasons and to save all users from having to remember to close that reference. (No, we can't include it only if the Event Structure has it grown out... the code that generates an event knows nothing about the recipients of the event and the recipients may dynamically change as things are running). Many VI Activations do not need the refnum.

 

If you need the refnum, just wire the VI Name directly to Open VI Reference. Problem solved.

TurboPhil
Active Participant

>Question? What question? It's the name of the VI, fully qualified everytime, with the clone number included if it is a clone. Why is this a problem?

 

That's good to know. That's not clear in the documentation. And made more confusing by the fact that there is also a "clone name" property.

 

Is the output of the VIName event node identical to the result you get from using the "VIName" property node? I know that we have some internal code that was initially developed because the VIName property node does not return the fully qualified name when dealing with clone instances. Or at least that's what the comments say; it's possible that it was a misunderstanding on the developer's part....

Darren
Proven Zealot
Status changed to: Declined