LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NaN/PathRefnum? function producing useless answers for Path, Refnum

Solved!
Go to solution

@altenbach wrote:

camerond wrote:

I'm trying simply to see if an INI file exists, so I created the following snippet:


The right way would be to use this function... Check if File or Folder Exists VI. No need to create your own. Smiley Happy

 


But, as in all things, TIMTOWTDI.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 11 of 13
(293 Views)

The output of "Open Config Data.vi" isn't a true refnum.

You can use the attached VI to check a config refnum (not guaranteed to work in later versions of LV)

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 12 of 13
(267 Views)

@altenbach wrote:

camerond wrote:

I'm trying simply to see if an INI file exists, so I created the following snippet:


The right way would be to use this function... Check if File or Folder Exists VI. No need to create your own. Smiley Happy

 


I don't like this function for a couple reasons.  First an empty path returns true and I understand why, but that has never been a need of mine (or anyone I know) so I AND it the OpenG function Valid Path which must be not not-a-path, and not empty.  But my other complaint is it is slower then the OpenG File Exists because of a bunch of checks into LLBs and Packed Libraries (that again are rarly used).  Using these two OpenG funtions works better for me, and is about 5 times faster at determining if a path should be used for some function.

0 Kudos
Message 13 of 13
(245 Views)