03-04-2014 10:42 PM
Hi
I need to reload a VI through a front panel control. I want to obtain VI's path using the refnum to path function in order to reload the VI using Load and Run. There is an error although according to the context window both source and sink are of same type.
P.S already checked detailed explanation
03-04-2014 10:50 PM
that image is not very useful. Can you attach a simplified version of the VI instead? Where does the refnum come from?
03-05-2014 12:57 AM
The refnum comes from the invoke method used to open a sub panel and wired to a shift register.
03-05-2014 01:08 AM
According to the help, "You can wire only file refnums to refnum". I don't think it is supposed to work with a VI reference.
03-05-2014 02:36 AM
To explain a bit possible reasons for this constraint:
References are first of all only pointers to some space in memory; that means, they are only numbers where the actual number is the address in memory of the data space the reference is pointing to.
That being said, most references are completly incompatibel to a "path" or a "string". So casting a reference to a path or string makes only sense for references pointing to file-based data spaces, aka "file streams".
VI RefNum is not necessarily a "file stream" as you can acquire a reference to any VI you haven't saved yet, but is in memory. So it must not be compatible to a file-based reference (like a file handle you get from "Open File").
Norbert
03-05-2014 01:27 PM
Just use a property node: