DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Property DisplayName

Solved!
Go to solution

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.

0 Kudos
Message 1 of 4
(4,077 Views)

From TDMS file format perspective, the properties cannot be deleted, the property value can be overwritten, but we don't support deleting properties.

0 Kudos
Message 2 of 4
(4,073 Views)
Solution
Accepted by topic author St3ve

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

0 Kudos
Message 3 of 4
(4,065 Views)

Brad,

 

  1. Write units to "unit_string" property in LabVIEW - Couldn't agree more, it was my own fault for rushing to finish the app and not checking the TDMS files before I had a load of them!
  2. I'm using version 11.2 of DIAdem. It definitely seems buggy, I hadn't noticed that it was read-only though (it also appears grayed out in the portal). It seems likely that it is because my custom property "Unit" shares the same DisplayName "Unit" as the property "unit_string".
  3. It would be nice to be able to set the DisplayName property of a custom property mainly to have "pretty" properties without "_" escape characters. Is this likely to be implemented?
  4. Thanks for the pointer about converting to TDM files but as my files are large the time spent saving them to a new format would not really be worth getting rid of a slightly annoying property!
  5. I'm assume you mean deleting base-properties as there doesn't seem to be any problem removing custom-properties (at least via the scripting interface).

 

On a separate note the OO scripting is a huge improvement and makes DIAdem much more pleasant to use.

 

 

Thanks,

Steve.

0 Kudos
Message 4 of 4
(4,055 Views)