LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Path for Config Refnum?

I'm writing some "identifier" information using the LabView Config (.ini) VIs.  I pass a path to Open Config Data, and it passes me back a RefNum that I can use in subsequent VIs to write my configuration info.  I'd like to be able to "extract" the path from the RefNum (as I'm able to do with a Binary File RefNum, simply by passing the RefNum to the RefNum to Path vi).  But when I pass the Config RefNum, I get <Not a Path>.  Is there a work-around?

Bob Schor
0 Kudos
Message 1 of 14
(4,316 Views)
Inside Not a Config Data Refnum.vi is a vi called Config Data Registry.vi. You can wire your refnum to this VI and the "Config Data Out" output is a cluster that contains the path. You can strip out the parts you don't need or build a wrapper VI that only outputs the path.
0 Kudos
Message 2 of 14
(4,303 Views)
Hi Bob,

You can get the file path from the Config Refnum by using the "Config Data Registry.vi" (\vi.lib\Utility\config.llb\Config Data Registry.vi). Unbundle the data cluster to get the file info.
Hope this helps.

PO.
0 Kudos
Message 3 of 14
(4,302 Views)
Many thanks!  "Answer Analysis" said this functionality must be there, but I couldn't find it.  How did you locate this -- did you "just know it", or is there a logical way to delve into the VI's included in VI.lib?  Is there, perhaps, a handy Guide to VI.Lib that LabView users can read/search to find out what is buried in there?  [Not that I'm too proud to ask for help -- the NI community is incredibly helpful and knowledgable -- but I don't want to be a pain in the rear ...].

Bob Schor
0 Kudos
Message 4 of 14
(4,269 Views)

Hi Bob,

For me, I had spent some time a while back figuring out how the config file VIs worked. They are not locked by NI as many of them are so you can dig down into them and see what is going on. That's how I knew about this VI.

When you use the Open Config Data.vi it calls Config Data Registry.vi which is essentially a functional global that stores all of the information about your ini file. The other config file VIs can then call it again to retrieve the data.

Unfortunately I don't know of any guide or help file that explains everything in VI.lib.

-Toby

0 Kudos
Message 5 of 14
(4,263 Views)
Hi Bob,

I too dug into the config VIs to see the dataflow.
I am not aware of any guide to the VIs included in VI.lib. You can always make use of probes and breakpoints to observe the data as it flows through different VIs.

0 Kudos
Message 6 of 14
(4,254 Views)

I was looking for the same thing as the OP, but the Config Data Registry.vi seems to be gone in LV 2013.

Has anyone figured out how to do this in LV2013... I just haven't been able to do anything with the currect Config.llb

 

Thanks. 

0 Kudos
Message 7 of 14
(3,566 Views)

In later version of LV the config VIs have been converted to a class, where all the data is private. You could modify the class, but I would not recommend that. You could create a copy of the class and modify that, but I would not suggest that either.

 

I would suggest that if actually need the path (do you actually need it? What would you do with it?), then you should pass it along separately or in a cluster or class which holds both the path and the refnum.


___________________
Try to take over the world!
0 Kudos
Message 8 of 14
(3,549 Views)

Thanks tst...

 

I acutally just found what I was looking for but somehow completely overlooked.

I actually need the File DIalog Express vi located under Advanced File Functions.

I need the user to be able to navigate to a folder and then generate the path to be used later in the program to dump test data records.

0 Kudos
Message 9 of 14
(3,537 Views)

Try these.

 

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 10 of 14
(3,522 Views)