09-19-2011 11:08 AM
Hi,
A quick question on properties...
1) I noticed that if I add a property with the name "Unit" in LabVIEW to a TDMS file I then can't delete it in DIAdem. It seems that it is confusing it with the reserved property "unit_string" (which has the DisplayName "Unit") - I suspect this is a bug and not the intended behavior?
2) Why is the "DisplayName" property of a custom property is read only?
Regards,
Steve.
Solved! Go to Solution.
09-19-2011 08:59 PM
From TDMS file format perspective, the properties cannot be deleted, the property value can be overwritten, but we don't support deleting properties.
09-20-2011 08:18 AM
Hi St3ve,
If you're going to create TDMS files in LabVIEW and view them in DIAdem, PLEASE write the unit information to the "Unit_String" property using the "TDMS Property Set.vi" in LabVIEW-- this will avoid all confusion and frustration.
It does look like the behavior of a "Unit" property in the Data Portal is buggy since DIAdem introduced unit handling in version 11.0, I hadn't noticed that before. What version of DIAdem are you using? The message box talking about not being able to address the unit information with the "Unit" property looks intentional, but you should be able to delete the property interactively, which fails in DIAdem 2011.
You can use the TDM Header Object to remove the unwanted property from a TDM file, but as Yongqing says the TDMS file format does not support removing a property, which makes it that much more irksome that you can't delete it in the Data Portal. You could save the TDMS file to a TDM file, remove the unit, then save it back to a TDMS file...
Set TdmHdrObj = DataFileHeaderAccess("C:\Example.tdm" , "TDM", False)
Call TdmHdrObj.ChnPropDel("[1]/[1]", "Unit")
Call TdmHdrObj.Save
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-20-2011 12:11 PM - edited 09-20-2011 12:20 PM
Brad,
On a separate note the OO scripting is a huge improvement and makes DIAdem much more pleasant to use.
Thanks,
Steve.