04-12-2016 04:56 AM
Hi,
Is there any way to store tables in TDM files?
After processing data my results are a list of values which is in the form of table. And normally we save only the TDM file (and not the TDR file), in this case if I want to save the table I have prepared what method could be used?
Hope the question is clear else do let me know.
Thanks in advance.
Regards,
fazshah.
Solved! Go to Solution.
04-12-2016 08:15 AM
Hi faz,
Typically a REPORT table displays either channel values or property values, both of which save with the TDM file. Are you using some other forma of table?
The sort answer I'd give would be to have a group of channels in the Data Portal somewhere, with on channel for each REPORT table column. This may or may not match your use case, though.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-12-2016 08:31 AM
Hi Brad,
I am doing some calculations based on the channels in the data portal, after which I get some result values. These values are entered in table.
So basically I have a table with 'Text lists'.
Having channels for each column is not sufficient. Is there any other way.
Another thought I had is to open an excel file and enter the values and save in the location of my data. But I would prefer have it in single file.
Thanks.
Regards,
fazshah.
04-13-2016 09:25 AM
Hi fazshah,
What do you have in each field of your Text List in the REPORT table? Are they formulas that request properties from Root, Group, or Channels in the Data Portal, do they reference global variables, or do you programmatically create the Text List so that it contains the content you want to display as plain text?
I strongly recommend that you save your scalar results as properties and reference those properties with formulas in your Text List. Properties will save automatically to the TDM or TDMS data file, and when you reload that data file and the REPORT layout, your table will show the results again.
Brad Turpin
DIAdem Product Support Engineer
National Instrumets
04-13-2016 11:31 AM
04-13-2016 04:14 PM - edited 04-13-2016 04:15 PM
Hi fazshah,
Once you calculate the scalar metric you want to display in your table's Text List field, first save that metric as a property attached to the Root, or a Group or Channel in the Data Portal:
Data.Root.Properties.Add "PropName", PropValue '----------------- or ------------------------- Set Group = Data.Root.ChannelGroups("GroupName") Group.Properties.Add "PropName", PropValue '----------------- or ------------------------- Set Channel = Group.Channels("ChannelName") Channel.Properties.Add "PropName", PropValue
Then you can add the formula to the Text List field that displays that property you just wrote:
PropName = @@Data.Root.Properties("PropName").Value@@ PropName = @@Data.Root.ChannelGroups("GroupName").Properties("PropName").Value@@ PropName = @@Data.Root.ChannelGroups("GroupName").Channels("ChannelName").Properties("PropName").Value@@
You can also reference Groups and Channels by numeric index instead of name, if you prefer.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-14-2016 12:48 AM
Oh, shoot!
Didn't think it was that easy. Thanks alot anyway.
Regards,
fazshah