LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

FileSelectPopup, discriminate multiple types with same extension

Solved!
Go to solution

Hi,

 

When using a file select popup with multiple file types of the SAME extension, such as:

 

FileSelectPopup ("", "(8 bit)*.tiff", "(8 bit)*.tiff;(16 bit)*.tiff", "Save As", VAL_SAVE_BUTTON, 0, 0, 1, 1, file);

 

Is there any way to know which "save as type" was selected by the user on the popup?

(win7x86; CVI 2010)

 

cheers,

Diz

0 Kudos
Message 1 of 6
(3,314 Views)
Solution
Accepted by topic author Dizz

None that I know of.

In your case you will need to examine actual file contents to discriminate among different available types: I suppose this is what image-oriented programs do. A tiff file should have an header that clarifies which tye of image is stored in it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 6
(3,309 Views)

Urgh. Though so..

 

The issue is when saving the file. For example when saving a .uir file in CVI, you have the option of saving it as different versions which share a common extension.

 

As a workaround I suppose could create a fake extensions like ".tiff(8bit)" and  ".tiff(16bit)" which get changed after the popup, but this makes it a little confusing for the user. Or another dialog.

This app will mainly be used by 'technophobes', so I'm on a mission to create as clean a GUI as possible..

 

Thanks anyway - your replies are always prompt, concise and helpful !

 

cheers,

diz.

0 Kudos
Message 3 of 6
(3,293 Views)

I dodn't focused on the "save" option enabled.

In such a situation I would design a small options panel with abutton to select the destination filename using FileSelectPopup, a radio button or a ring to discriminate the file format and usual OK and Abort buttons.

This unless you can determine the final file format from the origin of your data (i.e. if you are saving a 8bit image, use 8-bit TIFF format and so on, provided you must not perform format conversion during save).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 6
(3,284 Views)

Considering your "technophobic" users, the 8bit/16bit option may frighten them. In designing the user interface a simpler Standard-quality-fast-save vs. High-quality-slow-save or similar choice may be more user friendly.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 6
(3,280 Views)

he he. Yes, you are right about the 16/8 bit confusing them. We have already had a small training session where it was explained as high and low quality, but even that caused eyes to glaze over...

 

Not so keen for another dialog box; I'd prefer to keep the amount of clicks per action to a minimum, so will just remove the 8 bit option.

 

For the 'operational administrators' of this project/system, I'll make a small app to convert from 16 to 8 bit which is registered as an extended context menu option in windows.

 

0 Kudos
Message 6 of 6
(3,262 Views)