LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is the difference between refnum and path ?

Solved!
Go to solution

hi !

there is a refnum output from the read/write to file .

there is also a path data type.

can someone clarify a little bit ?

0 Kudos
Message 1 of 4
(4,370 Views)

@hookso wrote:

hi !

there is a refnum output from the read/write to file .

there is also a path data type.

can someone clarify a little bit ?


First, are you referring to a VI that has both a refnum out and a filename out? Or, just stating that there are paths and refnums existing in our world at the same time?

 

A refnum is a reference to an open file, which you obtain using Open/Create/Replace File.vi or any of the many functions that allow a file to be opened and written to/read from. You can use this refnum to perform operations on the file further along down the line. The refnum is later closed (or at least it should be) with the Close File function.

 

Note that VI's like Write To Spreadsheet File take a path in and have a path out, but if you look under the hood, it opens a refnum, uses it, and closes it.

 

A filepath is very similar to a string, in that it only conatins text, even though it is "specialized" text. In fact, paths can be converted to and from strings.

 

 

Richard






0 Kudos
Message 2 of 4
(4,365 Views)
Solution
Accepted by topic author hookso

And as the help explains, you can wire a refnum to the path input. Please note the different behavior when you wire a path or a reference.

0 Kudos
Message 3 of 4
(4,360 Views)

Oh that's just great.

Richard






0 Kudos
Message 4 of 4
(4,316 Views)