DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to lock a sheet of report to avoid data changes?

Solved!
Go to solution

I'm looking for a way to lock a sheet to avoid data changes while the script is loading other TDMS file.

 

Being clearer: I have a layout which I fill it with data from TDMS file by script but it needs to close and open some TDMS file but I do not want to change some sheets previously filled in with other TDMS file data after I close it and open another TDMS file.

 

Does someone know?

0 Kudos
Message 1 of 4
(3,190 Views)

As far as i know, each object (including plot and report object) only has a reference to the root data / channels, it's not a copy of the data and so you can't lock (save) the data of the object directly, so if you change/reload channels the data is loss. Possiblities to keep data are:

1) export the report

2) use a self defined copy (part) of the read out data to store the data you want to plot. You can do this by using global variables or a data object, e.g.

oCGPlot.Channels("Channelname").Values = oCGData.Root.ActiveChannelGroup.Channels(...).Values

0 Kudos
Message 2 of 4
(3,158 Views)
Solution
Accepted by topic author clebermarques

Hi clebermarques,

 

olhass is correct, the REPORT panel graphs and tables, etc. reference the data in the Data Portal.  This is a feature that enables you to re-use a defined REPORT layout (*.tdr file) with different data sets.  You have two options to achieve multiple REPORT sheets that show data from multiple data files:

 

1) Save each REPORT sheet separately.  You can export an image file from the REPORT panel for each data file that you load.  You can also append a REPORT sheet to an existing PDF file.

 

2) Simply load multiple data files into the Data Portal at the same time.  There's nothing keeping you from having REPORT sheet 2 reference the data in Group 2 of the Data Portal, etc.  If you want to use the same *.tdr file for each data file, I can help you with a script that will point the graphs and tables, etc. to the desired Group in the Data Portal.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 3 of 4
(3,153 Views)

Thanks! I set the first option. I created only one layout and a script to load one TDMS per interaction, generate PDF for each one and then I merge the PDFs.

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