Skip to content

TC2D Automation

Most algorithms within TableCurve 2D offer a powerful automation facility that enables the automatic processing of large numbers of data sets in the same manner as the one currently being processed.

Data Source

The data source can be one of the following:

  • Data streams returned using a TableCurve 2D format automation DLL
  • Data sets stored in an Excel 95 or Excel 97/2000 format file

Automation DLL

Generate/8984.gif TableCurve 2D offers the means to acquire data using a DLL interface. The program ships with tcauto1.dll, tcauto2.dll, and autoacq.dll, sample DLLs that simulate different data acquisitions. These DLLs and their C/C++ source code is in the Automation subdirectory. These files should be used as templates for creating automation DLLs.

TableCurve 2D will optionally pass a setup value from 0 to 255, allowing up to 256 acquisition schemes, sampling, and so forth from a single DLL.

Each data stream acquired can be up to 65536 points in length.

The Test Automation DLL option in the Help menu can be used with your automation DLL to generate Excel worksheets.

Excel 2000/97/95 File

Generate/8982.gif If the data source is an Excel 95 or 97/2000 file, you must specify the file, and whether to process the first sheet, all sheets, or a specified sheet. You must also specify how the data are stored. Two formats are supported. For XY Pairs, the first X must be in column A, the first Y in column B, the second X in column C, the second Y in column D, and so on. For Single X, the X values must be in column A, the first Y in column B, the second Y in column C, and so forth. Typically the main data titles will be in the first row, the X and Y titles in the second row, and the data will begin in the third row.

Excel 95 is limited to 16384 rows while Excel 97/2000 supports up to 65536 rows. If the first two rows are used for titles, the data length limits will be 16382 and 65534.

The TableCurve 2D main window displays the amount of free RAM available. If this quantity is sufficient, TableCurve 2D will load the full Excel file into memory, resulting in very fast import of each successive data set. If the free RAM is insufficient, TableCurve 2D will need to read each set from disk, a significantly slower operation, especially with large files.

Be sure the Excel file you are processing is not currently open within Excel.This not only consumes memory, but requires that TableCurve 2D make a temporary copy of the file on disk before each import.

TableCurve 2D reads Excel files directly, without using OLE automation. There is no need for MS Excel to be open, and TableCurve 2D does not launch it.

The Test Automation DLL option in the Help menu can be used with one of the sample DLLs (or your own automation DLL) to generate large Excel worksheets for testing automation performance.

Processing

The graph(s) for the current procedure are updated as the data sets are imported and processed. Numeric information fields are also updated. This update occurs even when no export options are selected.

Generate/8912.gif When the processing is underway, all options are disabled except the Reset button. The automation can be halted by clicking this button or by pressing the Space bar, Enter, Tab, End, or Esc keys.

When the automation ends as a consequence of user intervention, an option is presented to transfer the current data set into the program's XY data table. This may be useful when screening large numbers of data sets for an anomalous condition. In general though, such screening procedures are done in an unattended manner using MS Word and/or MS Excel export.

Export

Two export options are generally available. Either or both can be selected. The first is an MS Word/RTF (Rich Text Format) file containing numeric summaries and/or graphs. The other is an Excel 95 or Excel 97/2000 file containing numeric data.

MS Word/RTF Export

Generate/8981.gif MS Word/RTF export is available for all options where graphs and reports are useful. If this export is available, there is a choice to stream the output directly to MS Word (Word 95, Word 97, and Word 2000 are supported), or you may write the information to a portable RTF (Rich Text Format) file.

The content available for export varies widely with the procedure. In most procedures, at least one type of graph can be selected. When an option employs dual graphs, both will be automatically written to the file. The graphs will be constructed using the current plot settings and sizes, and inserted as Windows Metafiles. You can select landscape or portrait mode for the graphs. The dimensions of the graph within the file will based upon 96 pixels per inch. Note that beyond a certain size, the graphs utilize full landscape or portrait pages.

Numeric reports are included using the current options set for them. For RTF files, you can independently select landscape or portrait mode for the inserted text. For MS Word streamed export, a single orientation applies to both graphs and text.

Note that RTF files with graphs can grow quite large when processing an appreciable number of data sets. Be certain you have sufficient hard disk space on the drive where the exported RTF file is being written before initiating an automation session. An RTF file is written directly to disk, without using OLE automation. There is no need for MS Word to be open, and TableCurve 2D does not launch it.

MS Word DOC files are more efficient than RTF files in storing graphs. This is particularly true of the newest releases which compress metafile information.

The general Preferences option contains the Use A4 as Default Paper Size option. By default, MS Word and RTF export is formatted in 8.5 x 11 size. If you want the export formatted for an A4 paper size, you must check this preference. The A4 preference also applies to the MS Word and RTF export option.

Excel Export

Generate/8983.gif All procedures supporting automation offer Excel export. Some offer extended numeric data while others write only basic two column data. If Extended Data is available, you may elect to disable it and write only the basic data. Extended data is written to the Excel file in the format used for displaying information in the List Data option of the procedure. For the Curve-Fit Review, the export is only available in an extended format.

The export can be written using one worksheet for each data set, packing as many data sets as possible per worksheet, or if possible, the export will be written to match the input Excel format. Both Excel 95 and Excel 97/2000 formats are supported. Excel 95 is limited to 16384 rows while Excel 97/2000's limit is 65536 rows. TableCurve 2D limits the number of sheets written to 255. The automation will be automatically closed if this sheet limit is reached.

The last two columns of each worksheet are not used, in case you wish to average data across all columns on a given sheet. Similarly, the 256th sheet is reserved in case you want to average data across sheets.

Just as with the RTF export, Excel files can grow quite large, especially when large amounts of numeric information are written for each data set. Again, be certain you have sufficient hard disk space on the drive where the exported Excel file is being written before initiating an automation session.

The Excel file is not immediately written. For optimum real-time performance, the information is first written in a streamlined binary format that uses very little processing time. When the automation is finished, this temporary binary file is converted to an actual Excel file. Although the Excel file is written directly, without OLE automation, this may still require some time if very large files are involved. You may work within Excel while an automation session is underway.

Background Automation

TableCurve 2D's automation is designed primarily for unattended processing of large numbers of data sets. To run an automation session in the background, while working on foreground tasks in other applications, simply minimize TableCurve 2D's current or main window. In Windows NT and Windows 2000, once an automation session is underway, you may want to launch the Task Manager, right click on TableCurve 2D, and set the process priority to low. This should maximize foreground performance.

Keep in mind that the Excel data source automation will be most efficient when sufficient RAM exists to load the full Excel file into memory. Many applications, such as MS Word and MS Excel, consume large amounts of RAM. Windows itself consumes a surprisingly large quantity of RAM. Typically, unless you have 64 Mb of RAM or higher, Excel data source automation will suffer if the Excel file is large and other major applications are running concurrently.