DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Channel Attributes That Were Created Using Deprecated Functions from older versions of Diadem

I wish to read some old diadem (v8.x) files

 

Various attributes in the DAT files were set using the following functions

 

CHNATTRTXT1( nChnIndex ) 

CHNATTRTXT2( nChnIndex )

CHNATTRVAL1( nChnIndex )

CHNATTRVAL2( nChnIndex )

etc

 

These functions can still be used in newer versions of Diadem, but I understand they should no longer be used as they are deperecated.

 

I wish to query these using the newer syntax. My guess was that something like the following should work:

 

eg: Data.Root.DataGroups(1).Channels.Item(sISOCode).Properties.Item("CHNATTRINT1").value

 

But this does not work. as the attributes cannot be found. I get the error: 

 

     "The index CHNATTRTXT1 does not match any of the elements in the list."

 

 

My question is how to I access the values stored via CHNATTRTXT1/CHNATTRTXT2/CHNATTRINT1/CHNATTRINT2 using this newer syntax. Is there a naming convention for these older attribute names?.


I cannot see the  CHNATTRTXT1 attribute in channel properties be it Base Properties/Extended Properties or Custom Properties.

 

 

0 Kudos
Message 1 of 2
(1,214 Views)

Hello Onkar,

 

the DIAdem DAT file format was defined around 1984. At that time still for the previous software DIA/DAGO under the operating system DOS. This exists now nearly 40 years.
In 1995, the first DIAdem version under Windows was released. And since 2003 there is the dynamic data management based on the TDM data model and for DIAdem the TDM file format. With the plug-in technology - the DataPlugins - data can be imported into DIAdem and indexed by the DataFinder. This is also about 20 years ago now.

For the DAT file format there is also such a DataPlugin, which is installed together with DIAdem. However, this DataPlugin supports only the record comments, but not the channel properties mentioned above. This means that a search of these properties is not supported.

The following script reads the contents of a given DAT file and writes this to the log file - without having to load the whole file. Maybe this helps.

dim iLoop, sFullPath

sFullPath = "d:\<MyPath>\<MyFileName>.dat"
Call HdLoad(sFullPath)
if FileChnNo > 0 then
  for iLoop = 1 to FileChnNo
    Call Print(FileChnAttrTxt1(iLoop) & " - " & FileChnAttrTxt2(iLoop))
  next
end if

Greetings

Walter

0 Kudos
Message 2 of 2
(1,160 Views)