DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a file property from a TDMS file that has not been loaded

Solved!
Go to solution

Need to get file property data from a tdms file that has not been loaded.

I have a script that loads multiple tdms files.  I need the property data from one of the tdms files that is loaded later in the process.  

It appears that the first tdms file loaded brings the file properties with it.  But consecutive tdms file that get loaded only bring in the group and channels and their properties.  The file properties are not available.  

Exampls Script and 2 files are attached.  

 

If I were to get a file properties from the data portal I'd do something like this:

myPPR = Data.Root.Properties("VVA_HEADER_Counts_Per_Revolution").Value

 

What should I change to get this file property from a file that is not the first to be loaded.  

 

Thanks for your help.

0 Kudos
Message 1 of 3
(916 Views)
Solution
Accepted by topic author Swimmer

Hello Swimmer,

 

there are different ways to get it; I'd prefer to load the files separately and store the properties in variables of your code. But it's a quite long way.

Easier woulod be to change the Diadem settings/options (sorry, my system is in german):

Diadem options > Modules > Load behavior > Inheritance of properties

There you can change the default (e.g. "None") to "Move to loaded level" or something similar.

 

settings.PNG

 

Then you would find the properties you're looking for not at the root level, but in the loaded groups.

Dia791_0-1678288892116.png

 

Try out and let us know, if it works for you.

Greetings,

Vassili

Message 2 of 3
(896 Views)

Thanks for your reply Vassili. 

Works like a charm.

Appends "root_" to the property names making it easy to understand what was added to the group properties.  

Thanks for your help, 

Dave

0 Kudos
Message 3 of 3
(891 Views)