Quantcast
Channel: DIAdem topics
Viewing all articles
Browse latest Browse all 3196

Properties(wf_start_time ).Value cannot load from DataFileHeaderAccess?

$
0
0

Hi everyone,

 

I'm trying to extract metadata from a large volume of files, which I intend to use to create something like a diff log for channels, properties, and property values over this massive collection of files. 

 

Right now, my best plan is to use CreateDataFileHeaderAccess to retrieve channel names; and for each channel, retrieve each property (at least the relevant ones) and the values thereof.

 

Unfortunately, I'm running into an issue when I try to write the value of the property "wf_start_time", which yields the error "Object doesn't support this property or method." I've confirmed that the property exists, and if the data is loaded into the Data Portal, then Data.Root.ChannelGroups(grp).Channels(chn).Properties("wf_start_time").Value returns the correct value without an error. Is there something about DataFileHeaderAccess that doesn't play nicely with this particular property, and if so, does a workaround exist?

 

Sample code:

Dim filePath

Dim dataFileHeaderAccess : Set dataFileHeaderAccess = CreateDataFileHeaderAccess
Dim dataStore : Set dataStore = dataFileHeaderAccess.Open(filePath, "TDMS", True)

Dim channel0 : Set channel0 = dataStore.RootElements(1).Children(grp).Children(chn)

Dim channelP : Set channelP = channel0.Properties
channelP.ListInstanceProperties = True

Dim i, oProp
i = 0

For Each oProp in channelP
i = i + 1
Call LogFileWrite(i & vbTab & oProp.Name & vbTab & oProp.Value)
Next

This code will execute until it tries to write the "wf_start_time" property value, at which time it will throw the error. Changing the LogFileWrite output (e.g. skip the step if oProp.Name = "wf_start_time") will execute the code without error - but the waveform start time is one of the properties that I'd like to have. 


Viewing all articles
Browse latest Browse all 3196

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>