DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

FileDlgFilter information from FileNameGet command

Hi There,

 

I am trying to select multiple files and load them through FileNameGet command.

 

Its very similar to the example given by you as below

 

Call FileNameGet("ANY", "FileRead", DataReadPath, "TDM data (*.tdm),*.tdm,Text Files Format A(*.txt),*.txt,Text Files Format B(*.txt),*.txt", "All.lst", True, "Data selection")

 

 

But with this command I am not able to get the FileDlgFilter information. This is very important for me because I am loading files which will have the same file extenstions but different file format.Various plugins will be created for this purpose. I would be able to call the required plugin keeping FileDlgFilter information.

Do you have any other solution for this or can you let me know if there is anything I am missing.

If you would suggest me to register the plugin, then I would like to add that even TDM file selection is not been recongnised in FileDlgFilter .

 

Looking forward for your earliest response.

Thanks,

Priya

0 Kudos
Message 1 of 6
(3,564 Views)
Hi Pyira,

The dialog FileNameGet is a Windows standard dialog which only has the capability to use a filter for file extensions. So if you have different files with identical extensions, it is not possible to define a more detailed filter.

But this is not really necessary. This should be handled from the DataPlugin. In DIAdem you can specify more than one DataPlugin for a specific file extension. If the first DataPlugin doesn't match the next one will be tried.

Greetings
Walter
0 Kudos
Message 2 of 6
(3,552 Views)

I was thinking I would be able to handle this before calling in any plugin. But looks like this is the only other option left.

Thanks a lot.

Priya

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

Hello

 

This is very old topic, but I think I don't need to create new one.

I'd like to know If something changed about this issue until today.

Because I'm struggling with the exactly same problem.

 

For example I need to use Dataplugin SEFRAM_REC (*.rec) and also SEFRAM_REC_2022 (*.rec) at the same time.

I don't know how to get name of selected dataplugin from FileNameGet dialog.

 

Is there a workaround of this problem?

 

Thank you in advance

 

John 

0 Kudos
Message 4 of 6
(99 Views)

As Walter Rick wrote in his post long, long ago the concept in DIAdem is not to select a certain plugin but just a file type. When you call the DataFileLoad command DIAdem tries to use all plugins assigned to this filetype in sequence as defined in the data plugin parameters:

 

mllerkrahmer_0-1742231179928.png

 

So make sure that file format recognition is active in your plugins:

 

mllerkrahmer_1-1742231315262.png

 

Holger Müller

DIAdem experience since 1996
Turn-key applications - Remote and on-site trainings - On-the-job training

| müller+krahmer GmbH | Koenitzer Straße 14, 07338 Kaulsdorf / Germany |
| Phone: +49 36733 / 2328 - 6 | Mobile: +49 160 / 287 7294 |
| Email: mueller@mueller-krahmer.de | Web: www.mueller-krahmer.de |
0 Kudos
Message 5 of 6
(48 Views)

Hello

 

Thank's for the reply.

I'm afraid your method would not be applicable in my case.

I'll try to briefly explain why I'm doing this.

 

The Sefram *.rec data files are all in binary format. I need to use vendor's  DataPlugin SEFRAM_REC and the newer version SEFRAM_REC_2022 for newer appliances.
The newer SEFRAM_REC_2022 DataPlugin can of course open older *.rec files as well.
However, there are some problems with these plugins.

 

  • The older SEFRAM_REC is a VBCrypt-based DataPlugin, but the newer SEFRAM_REC_2022 is based on LabView.
  • If I load a file of e.g. 100 MB using the older SEFRAM_REC plugin, Diadem allocates about 500 MB of memory - that's fine. However, if I use a newer plugin to load the same file, Diadem takes almost 2 GB of memory. If I try to load a 1GB data file, Diadem takes almost 16GB of memory. I use Diadem in a virtual machine and sometimes the system runs out of resources.
  • The newer and older plugins probably have a bug, because after loading the file, I have to fix the "Waveform x-start time" (gives the wrong start time value) and "Waveform x-step-width" properties for all channels (always gives the number of seconds, even if the original file was loaded with a milli(micro)second sample rate. The channel unit is always set to "s"). This is also why I can't use the "Register" function instead of the "Load" function.

When it comes to ASCII text files, I have other problems. For example, I have two csv data files from two different appliances. They are almost identical. There is no special word in the first line. The only difference between them is the character code page and the format of specific columns (e.g. DateTime field with seconds vs. field with microseconds). So I need to differentiate the two plugins, and it seems to me that the easiest way is to let the user select the correct plugin. Also, this is just an example. I could imagine many versions of almost indistinguishable csv formats.

I must admit that I have not been able to find an alternative dialog object (e.g. ActiveX) with the ability to return the selected filter line. I'll probably try to work around the problem via the user SUD.

 

John

0 Kudos
Message 6 of 6
(32 Views)