LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file path of open data storage

Solved!
Go to solution

Hello all!

 

Now I'm using the blocks of open data storage, write data and close data storage for storing and extracting result data. For the file path issue, before I

 

set the data path by double clicking the "open data storage" block and inserting the file location in the indicated place, and that worked!

 

Now since I made a stand alone application of this program and shall use it in other computers, the file location I inserted in open data storage block isn't

 

valid any more in other PCs. So I modified my source code by connecting a "current vi path" to the open data storage block's file path node instead of

 

inserting it inside the block, and this doesn't work! During running there shows an error in the write data block saying that the storage refnum isn't valid!

 

I'm wondering why I couldn't specify the file path like this. Any way to allow me to specify the file path as the current vi path?

 

Thanks!

 

Chao

0 Kudos
Message 1 of 3
(2,292 Views)
Solution
Accepted by topic author jcraffael

You need to account for the path changes when built in to an application, have a look at this example.

https://decibel.ni.com/content/docs/DOC-4212


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 3
(2,271 Views)

Thanks for the reply! i got it as well, since "current vi path" returns the file path with the vi's name, which I wrongly thought it returns the path of the folder.

 

So I used a strip path block to take off the vi's name and a build path block to add the data file's name, and that's it!

 

Thanks anyway for the reply!

 

Chao

 

 

0 Kudos
Message 3 of 3
(2,264 Views)