04-11-2017 12:20 PM
I have the following script:
Dim oMyDataFileHeaderAccess, oMyDataStore
Set oMyDataFileHeaderAccess = CreateDataFileHeaderAccess
dim mypath : mypath = "C:\MyFile.tdms"
Set oMyDataStore = oMyDataFileHeaderAccess.Open(mypath ,"TDMS", True)
logfilewrite oMyDataStore.RootElements(1).Properties.Exists("MyProperty") ' returns FALSE
logfilewrite oMyDataStore.RootElements(1).Properties("MyProperty").value ' returns the expected value
The "Properties.Exists" feature doesn't return what I expect. If I have a file where the root property "MyProperty" exists (and I can access the value!), the Properties.Exists("MyProperty") returns false 😞
Am I doing something wrong? Thank you!
Solved! Go to Solution.
04-12-2017 03:03 AM - edited 04-12-2017 03:04 AM
Hey Julia,
You have to set this property first before reading custom root properties 😉
oMyDataStore.RootElements(1).Properties.ListInstanceProperties = true
Same for group and channel properties
Regards
04-12-2017 09:17 PM
Perfect, thank you!