LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the VI path from a VI reference constant?

Solved!
Go to solution

Hi,

i need the VI path from a reference constant by VI scripting.

I generate a VI reference constant by right clicking on a "Call by Reference" terminal and choose "Create"->"Constant".

I link the referenz to my test VI and place the constant in a new empty VI.

VIreferenceConstant.png

Now i programmed a 2nd test VI to read the VI path. It works with a "Static VI reference" from the "Application Control" palette but it didn't work with a simple reference:

VIreference_analyser.png

I try to cast the reference into a VIRefNum-class or a VIRefNum (strict)-class but it didn't work as well as the try to convert the variant value into something helpfully.

So, i hope anyone has an idea or a solution of that problem for me.

Thanks

Oliver

0 Kudos
Message 1 of 3
(4,770 Views)
Solution
Accepted by topic author listing

There's a difference between the two. The static reference is linked to an actual VI. The reference type (the one showing the connector pane) isn't actually linked to a VI, so it can't return the VI path. It only has the connector pane data.

If you want to get the path from an actual static reference, you can cast it to the GObject>>Node>>StaticVIReference class and then use the path property.


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(3,910 Views)

Thanks a lot - how stupid.

::hit the head again the wall::

Sometime you walk through the world, keep the eyes closed.

But it is better to look forward and notice what happend on the left and the right side - like this time.

I was so fixed in that Idea to get the path out from the constant, that i didn't think about how to use them.

Sorry and thanks for opening my eyes

Oliver

0 Kudos
Message 3 of 3
(3,910 Views)