08-22-2013 05:09 AM
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.
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:
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
Solved! Go to Solution.
08-22-2013 06:12 AM
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.
08-22-2013 09:43 AM
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