取消
顯示結果 
搜尋替代 
您的意思是: 

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

已解決!
前往解決方案

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 積分
1 條訊息(共 4 條)
4,130 檢視

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 積分
2 條訊息(共 4 條)
4,098 檢視
解決方案
接受者 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

3 條訊息(共 4 條)
4,093 檢視

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 積分
4 條訊息(共 4 條)
4,081 檢視