LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where does labview save data file

Solved!
Go to solution

Hi There,

 

I am wondering when i choose current vi path and save some measurements file in a vi. Afterward when i make a .app file or .exe file, where does it save the data or results file. I looked at the application folder where i have the .app or .exe file and it does not save there.

 

Thanks

Yogesh 

0 Kudos
Message 1 of 8
(4,033 Views)

You must not have any error checking because it's not saving it anywhere. You cannot use current VI's path when you create an exe. The path in development mode might be c:\folder\main.vi but when you build it, it becomes c:\folder\app.exe\main.vi. Obviously, you can't save a file to the exe.

 

You need to do an extra strip path in an exe. There are numerous techniques to get the actual folder in an exe and you can write the program so that it works in both development and exe. This is a very common mistake that beginners make and there have been numerous posts and KB articles on it. Search for something like 'exe path'.

0 Kudos
Message 2 of 8
(4,025 Views)
0 Kudos
Message 3 of 8
(4,016 Views)

Thanks for the help. I changed all of my current vi path to the way it was suppose to be. I have couple of files which i saved using subvi of my program and call it again in main vi. It was working before also in .app version when i was using current vi path. I assume it save file in some temporary directory. But i also have a file in which i write all of the analyzed results from main vi. I strip path for that file using the way they explained. But if i want to see the file, i could not find it when i am using .app. I assume it might store somewhere inside .app folder or in some temporary directory. Is there a way to make sure that it save the file in the same folder as .app.

 

Thanks

Yogesh 

0 Kudos
Message 4 of 8
(4,013 Views)
Solution
Accepted by topic author Yogesh9ic

Never mind. It save file in .app package. I can see and read it by opening the .app package content.

 

Thanks for your help

Yogesh 

0 Kudos
Message 5 of 8
(4,009 Views)

Now I'm thoroughly confused.

 


Yogesh9ic wrote:

I have couple of files which i saved using subvi of my program and call it again in main vi. It was working before also in .app version when i was using current vi path.


What does this mean? You must have been doing something else because as the KB article points out, the Current VI Path returns a different value whether you're running in the development environment or from an application.

 


Never mind. It save file in .app package. I can see and read it by opening the .app package content.

I have no clue what this means. What are you referring to as the ".app package"?

 

0 Kudos
Message 6 of 8
(3,984 Views)

Sorry for confusing you. I am doing all of my programing in mac. When you make labview application file, in mac it makes it as .app instead of .exe. Initially i was using it current vi path and now i am using a path that have a case structure to give path differently if it is a application file and if it is .vi file. But i was interested in finding where it is saving the file. In mac you can right click on .app (application) file and choose to show package content. So i assume .app (application) file in mac is like a folder with all the file required to run the program. And so when i save the spreadsheet file, it save it inside the package.

 

I hope it help you understand.

 

Yogesh 

0 Kudos
Message 7 of 8
(3,972 Views)
Ah, OK. It's been a LONG time since I've used a Mac.
0 Kudos
Message 8 of 8
(3,963 Views)