Export Templates
Export templates are Templex programs that export curve data to files.
*Id("MotionView v4.0")
*BeginDefaults()
*BeginPlotDefaults()
*RegisterExportTemplate("MyFormat", "my.tpl", "dat")
*RegisterImportTemplate("/usr/people/altair/new_format.tpl")
*RegisterExternalReader("/usr/people/altair/altair_exe")
*EndPlotDefaults()
*EndDefaults()
The export template file referenced in the *RegisterExportTemplate() statement is a Templex program file. The Templex program utilizes the numcurves(), numpts(), curvelabel(), curvex() and curvey() functions to access the data in each plot which is selected in the export dialog.
{ ncrvs = numcurves();
ncrvs, %d; cr(); ' output the number of curves
for (i = 0; i < ncrvs; i++)
xvect = curvex(i);
npts = numpts(xvect);
for (j = 0; j < npts; j++)
xvect[j], %e; cr(); ' output X vector in exponential format
endloop
yvect = curvey(i);
npts = numpts(yvect);
for (j = 0; j < npts; j++)
yvect[j], %e; cr(); ' output Y vector in exponential format
endloop
endloop
}