LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog Save or Open

Solved!
Go to solution

It's a little hard to find a way to make a dialog to save or open file with more then one option.

I have done a dll in DEV-C++ to solve this problem.

 

The dll project was made at "c" format. 

 

 http://rapidshare.com/files/188811855/LabVIEW_-_Dialog_Open-Save_DLL_example.zip

 It's necessary to insert some Linker Parameters at Dev-C++ menu: Project / Option / (tab) Parameters / (textbox) Linker.

Put there the following parameters: 
-lgdi32
-lcomctl32
-lComdlg32
 
This dll was tested at LabVIEW 8.5 and 8.6.
 
If there is a better solution I'd like to know...
 
Thanks. 
0 Kudos
Message 1 of 15
(4,107 Views)

For some reason, i can not open the file.

Can you post the dll as attachment ?

0 Kudos
Message 2 of 15
(4,093 Views)
I downloaded, but I have to admit I don't quite understand the intent of this code. If you want to change something (like the list of filetypes) you have to go back to the C code, recompile it, and then (possibly) update the LabVIEW code. How is this a better solution than simply calling the Windows API functions directly, as they provide the necessary functionality?
0 Kudos
Message 3 of 15
(4,087 Views)
Solution
Accepted by topic author Weldon_Teixeira

The dll file is inside of the zip file at rapdshare site:

 http://rapidshare.com/files/188811855/LabVIEW_-_Dialog_Open-Save_DLL_example.zip

 I don't know a way to post here any file. If you want to, I should send you a email with the zip file.
 Good luck
0 Kudos
Message 4 of 15
(4,073 Views)

Hello,

 

I have seen some solution that I found, but, no one ran fine.

 

My example is necessary to change the code and recompile the dll file

for making your desired extension file. 

 

It's not very bad, since, in your application you just need to handle few file formats.

If your application must to handle several file formats you should set the 

filter for every file (*.*) .

 

Now, if you have a beter solution, for instance, calling Windows API directly,

I'd like to know how to do that, if you please. 

 

Thank you for commenting. 

0 Kudos
Message 5 of 15
(4,072 Views)
The Multiple File Selection Dialog example does the open file operation in pure G.
0 Kudos
Message 6 of 15
(4,055 Views)
There's also the example over at LAVA that uses no Windows API calls.
0 Kudos
Message 7 of 15
(4,052 Views)

You can also do this in .NET.

 

Message Edited by smercurio_fc on 01-24-2009 10:10 PM
Download All
Message 8 of 15
(4,049 Views)

I have seen a alike solution, but, did not run properly.

 

The  solution that you have shown run fine, but,

its code is a little big. Although, it's a good solution

I'll keep using the dll that I have done, but, I keep

your example. 

 

Of course, It's possible to make a subVI.

 

 

Thank you vey much 

 

 

0 Kudos
Message 9 of 15
(4,027 Views)

Weldon Teixeira wrote:
 

The  solution that you have shown run fine, but, its code is a little big.


A "little big"? Based on what criteria? Regardless of this seemingly arbitrary conclusion, your particular implementation has one critical flaw: It does not allow reuse. If you want to use different file patterns you have to rewrite the DLL. Pardon me for being blunt, but how can you possibly believe that to be a better solution?

Message 10 of 15
(4,010 Views)