LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question regarding Polymorphic VIs

Solved!
Go to solution

Let's use Read Key as an example (from the Configuration File VIs).

 

I want to wrap Read Key (which is Polymorphic) so that some other code always runs right before Read Key. However, to do this, it seems I have to make an instance of the wrapper VI for each output type that Read Key supports if I want it to support all the types. This is disappointing since in C++ or Java you'd just use a template or generic and you wouldn't need to do all this extra work. Is there a way around this when working with Polymorphic VIs?

 

The alternative is to always remember to put this code right before Read Key. Another less than optimal solution. If I want tightly connected and cohesive code, I want one VI and not a half dozen of them!

 

Anyways, this is almost certainly not possible so I guess this is more of a complaint haha.

0 Kudos
Message 1 of 2
(2,049 Views)
Solution
Accepted by topic author majoris

Vote up this idea in the LabVIEW Idea Exchange:http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Provide-a-better-way-to-implement-a-polymorphic-VI/idi...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,046 Views)