DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DataFileLoad inside a dataplugin

Solved!
Go to solution

Hello,

 

When importing *.7d7 type files using the existing dataplugin, some of the proparties are not loaded correctly. I wanted fix that by creating a new dataplugin. Since I do not have access to the file format ( and I don't really want to write the plugin from scratch)  I was trying to use the existing plugin and then cleaning up the loaded proparties.

 

Is there a way to use DataFileLoad inside the dataplugin vbs file? I get an error saying "Variable is undefined: 'DataFileLoad'

Also, I was trying to use msgbox inside the dataplugin as an easy way to debug but is was getting a "permission denied: 'msgbox' " error. 

 

Thanks for the help.

0 Kudos
Message 1 of 4
(4,048 Views)

Hello Denis,

 

When you refer to "existing DataPlugin" are you talking about a DataPlugin provided by National Instruments?

 

If you do, my suggestion would be to provide us with the offending data files so we can fix the issue in the DataPlugin for you and everyone else that might be using that particular DataPlugin in the future.

 

If this is not a DataPlugin provided by NI, we can still look into creating one for you - I wasn't able to find any reference to that format with a quick Google search though ...

 

    Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 4
(4,043 Views)

The file is actually *.d7d from DEWESoft, but I am having a similar issue with *.PNRF files from HBM so I was hoping to get it fixed myself. I will submit two requests for plugins as soon as posible. 

0 Kudos
Message 3 of 4
(4,031 Views)
Solution
Accepted by Denis.Vashuk

Hi Denis,

 

It is possible within a VBScript DataPlugin to open a File object with the data file path.

Set File = OpenFile(DataFilePath)

 

It is possible within a VBScript DataPlugin to open a Store object with the data file path and the name of the DataPlugin to use.

Set Store = OpenStore(DataFilePath, DataPluginName)

 

It is NOT possible to make any function calls or variable reads/writes that are part of the DIAdem VBScript host (i.e. what you normally run in the SCRIPT panel), because a VBScript DataPlugin runs in a separate VBScript host that is embedded in USI which has none of those commands or variables added to it.  Remember that VBScript DataPlugins can also be run on a computer that only has LabVIEW on it.

 

The interactive VBScript commands InputBox and MsgBox are also NOT allowed in a VBScript DataPlugin because they would hang the DataFinder when it is trying to index data files headlessly.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(4,013 Views)