LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDM File custom properties

I am trying to create a TDM file with custom properties in the Root, Ch. Groups and Groups.  I know that the TDM format can support custom properties, but LabVIEW gives me a 'property not found' error. 

Paul
0 Kudos
Message 1 of 13
(4,638 Views)

Hi Paul,

You can definitely implement custom properties, but the VIs to do so aren't on the palette.  There are VIs called _saveProperty and _loadProperty located in the Storage.llb.  Note that when you use custom properties in a file, they won't show up in the lists of properties on the Express VIs and there isn't an easy way to browse them in LV (DIAdem will show them when browsing).  You have to explicitly reference any custom properties by name.

This KB gives some more information and an example:

http://digital.ni.com/public.nsf/websearch/E62CE135EC61F6998625700200141877?OpenDocument

 

Regards,

Ryan K.

0 Kudos
Message 2 of 13
(4,629 Views)
Thanks for the pointer.  Notes about this.  The _saveProperty VI does not appear to work to create custom properties using the timeStamp data type.  It kicks out an error that it can not find the property.  Also if you uses spaces, preceding numbers and other special characters, the data does not appear in the custom property.  I have not checked the XML portion of the TDM to see if the data is present or not, but Diadem has the custom field but the data is blank.

As mentioned, the file output is being processed in Diadem, so the properties are not an issue.  We are using the properties to help with the data mining. 

Paul
0 Kudos
Message 3 of 13
(4,608 Views)

Hi Paul,

Actually DIAdem enforces strict naming conventions for custom properties-- pretty much only letters, numbers, and the underscore character (no space!) are allowed in DIAdem.  "Improperly" named properties will still be there and can in some cases be read programmatically with a DIAdem VBScript, but they will either not show up in the Data Portal or their values will not display in the Data Portal.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 4 of 13
(4,578 Views)

Thanks for the response.  It confirms the behavour that I have been seeing.  Basically, I think I have my issues solved.

Paul


Paul
0 Kudos
Message 5 of 13
(4,573 Views)
Does anyone know how to retrieve the data type of a custom property? "Get Property Type.vi" doesn't work for custom properties. Maybe in "Storage.llb" there's the right VI but I can't find it.
 
Thank you folks
 
Giuseppe Romaniello
0 Kudos
Message 6 of 13
(4,556 Views)
Not sure what you want to do with it, but parsing the TDM is very easy as it is a text based xml format file.  If you know the custom property name you can search for it in the TDM and parse the type out.  LabVIEW TDM VIs are very limited and the properties, I believe, are hard coded into the VIs and does not actively search the TDM for them.

Paul
0 Kudos
Message 7 of 13
(4,545 Views)

So let's say I open a TDM file in LabVIEW (8) using the Storage VIs.

I don't see a way to list what custom properties are in the file.

List Properties function does not list the custom properties.

0 Kudos
Message 8 of 13
(4,471 Views)
Brad Turpin provided this as a good example of how to read Custom Properties from a TDM file.
 
DataPlugin Tree View.vi basically lets you browse the contents of a file, including the custom properties.
 
The key to reading the custom properties is to use the Get Property function on Property Name "Instance_attributes". This returns an array of refnums to the custom properties; you can then use the Get Object Info and Get Property functions on those refnums to get the name and value of each of your custom properties.
 
Message 9 of 13
(4,459 Views)
I would like to see the dataplugin.llb but I don't have LV8 yet installed...  does anybody have this llb in 7.1.1?
---
Alex Rodriguez
0 Kudos
Message 10 of 13
(4,230 Views)