Jump to content

Get File path when opening saved data


Recommended Posts

Hi everybody,

I'm acquiring data and saving that on my disk as .dat.

Now I want to later open and analyse the data.

So I'm busy with writing a VI thats read the .dat file. The VI is going to be a .exe file.

This results in that I can set all my .dat files to that executable.

The problem is:

When I run my .exe, it still want me to select the .dat file I want to open.

But I want it to read the path of the .dat file i'm opening

Hopes my problem is clear ;)

____________

Michael ten Den

Link to comment

Hi everybody,

I'm acquiring data and saving that on my disk as .dat.

Now I want to later open and analyse the data.

So I'm busy with writing a VI thats read the .dat file. The VI is going to be a .exe file.

This results in that I can set all my .dat files to that executable.

The problem is:

When I run my .exe, it still want me to select the .dat file I want to open.

But I want it to read the path of the .dat file i'm opening

Hopes my problem is clear ;)

____________

Michael ten Den

If you mean you want it to remember a fixed location. then you will have to either save the path somewhere (and load it when tha app starts), hard-wire a path into the file open, or save a control as a default value (right click on control then select "Data operations>>Make Current Value Default")..

The reason it is asking you is because you have not specified a path into the file open (bear in mind that controls are reset to defaults when you open a vI or exe for the first time).

Link to comment

If you mean you want it to remember a fixed location. then you will have to either save the path somewhere (and load it when tha app starts), hard-wire a path into the file open, or save a control as a default value (right click on control then select "Data operations>>Make Current Value Default")..

The reason it is asking you is because you have not specified a path into the file open (bear in mind that controls are reset to defaults when you open a vI or exe for the first time).

Thanks for your respons, only thats not exactly what I ment.

I want the executable to get the path of the .dat file and open it.

Link to comment

Hi everybody,

I'm acquiring data and saving that on my disk as .dat.

Now I want to later open and analyse the data.

So I'm busy with writing a VI thats read the .dat file. The VI is going to be a .exe file.

This results in that I can set all my .dat files to that executable.

The problem is:

When I run my .exe, it still want me to select the .dat file I want to open.

But I want it to read the path of the .dat file i'm opening

Hopes my problem is clear ;)

____________

Michael ten Den

Do you want the application that you have written to load when you double click the *.dat file, and directly start processing the clicked *.dat file?

If this is what you want, please checkout the link

http://labviewwiki.o...indows_Explorer

/J

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.