*RegisterExportDLL()

Registers a DLL for use in exporting curves.

Syntax

*RegisterExportDLL (name, filename)

Application

MotionView, HyperView, HyperGraph, HyperGraph 3D, TextView, and MediaView.

Inputs

name
The name of the DLL as you would like it to appear in the interface.
filename
The filename of the DLL, including the complete path of its location.

Example

To register the DLL found in C:\software\export_dll.dll as "Export DLL":

*RegisterExportDLL("Export DLL", "C:\\software\\export_dll.dll") 

"Export DLL" will be at the end of the list of formats in the Export Curves dialog box. If "Export DLL" is selected as the format, the file name to which it is exported will read "export" (with no extension). When Export DLL is selected and curves are exported to it, the curves are exported by the format dictated in C:\software\export_dll.dll.

Comments

When you register a DLL using this statement, the name of the DLL (the first parameter) is displayed in the list of formats found in the Export Curves dialog. Selecting Export Curves from the File menu accesses this dialog. Once the DLL has been registered using this statement, it can be selected as a format for exporting curves and curve information.

Within the DLL, there must be at least three functions exported.
  1. The Open function to open the file. It takes only one parameter: the filename to open, passed as a string, which is specified by you in the Export Curves dialog. This function is called after you click Apply in the Export Curves dialog, but before any data is written, and opens the file "export" for writing (see example above).
  2. The WriteCurve function, which writes the curve data to the newly-opened file. This takes one parameter, which is a pointer to a PlotCurveData. The PlotCurveData struct holds the data for the curve. The PlotCurveData struct itself contains members that are of the structs AttributeData, VectorInfo, and NoteInfo. All of these structs can be found in the Exporting Curves using a Registered DLL topic. The WriteCurve function is called after the file has been opened, and writes the data out to the file opened by OpenFile. WriteCurve is called once for each curve to be exported.
  3. The Close function closes the file after the data has been written. It takes no parameters and is called after the data has been written to the file.
To summarize, the three DLL functions are:
Open(char* filename)
WriteCurve(PlotCurveData* curve_data)
Close()