LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I Get the Name of Data Connected to a Malleable VI?

At edit time, type info, including the name, is carried through wires; so this works:

paul_cardinale_0-1710447621187.png

 

Now in a malleable VI, I would like to get the name of the data that connects to the SubVI that calls the malleable.

I.e. if the above code were a .vim, I would want the name, not of the .vim's FP terminal, but the name of the data that's wired to the "My String" terminal of the SubVI that calls the .vim.

I think it should be possible because "Get Type Information.vi" is doing it; but I can't figure out a way to do it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 7
(347 Views)

I haven't personally messed with wire labels, but is this idea what you're looking to do?

0 Kudos
Message 2 of 7
(330 Views)

Have you seen this thread? I think I had the same issue as you.

0 Kudos
Message 3 of 7
(304 Views)

I've once stumbled upon the same problem while wanting to develop a generic logger VI.

 

I wish VIMs were truly equivalent to just dropping their code in a sequence structure in the caller. It would allow getting wire names. It would also allow containing XNodes, VI property/invoke with unwired reference, static references "This VI" and "This Application" (references to the current VI would redirect to the caller VI), accessing class private data (if the vim belongs to the class). It would only forbid nodes that refer to the front panel of the vim, such as pane and control static refs, implicitly linked properties/invokes and locals.

0 Kudos
Message 4 of 7
(247 Views)

@paul_cardinale wrote:

I think it should be possible because "Get Type Information.vi" is doing it; but I can't figure out a way to do it.


Get Type Information isn't a malleable VI.

 

The input in converted to a variant, and that conversion includes giving the variant a label of the wire.

 

Sadly, the .vim converts all inputs, so there will be no wire to variant conversion..

 

You can make the .vim assert if the wired type isn't a variant, but there's no way to stop the control from adapting. So you'd have to put a 'To Variant' on the wire yourself.

 

@BertMcMahan wrote:

I haven't personally messed with wire labels, but is this idea what you're looking to do?


Yes, exactly that.

 

It got declined on the first day, but I think there would have been some kudos if it was left open.

 

0 Kudos
Message 5 of 7
(176 Views)

Ironically, generics can do this (adapt one input, not the other)...

 

I wouldn't use them in production though. Although I can't find anything wrong with them, they are not supported...


0 Kudos
Message 6 of 7
(171 Views)

BTW, shameless plug (but on the topic of malleable VIs): 

 

recursive malleable VIs - LabVIEW Idea Exchange

0 Kudos
Message 7 of 7
(151 Views)