Navigation:  Programmer's Reference > Sending data to DPlot from another application >

Preserve3DScaleFactor macro command

Print this Topic Previous pageReturn to chapter overviewNext page

Macro commands may be used either in macros or by sending the commands to DPlot via dynamic data exchange (DDE). Some commands are valid only in macros (noted by Macros Only). Commands sent to DPlot via DDE must be enclosed by square brackets [     ]. Macro commands should not include the brackets.

Command parameters shown in the descriptions below are placeholders for the actual values. Command parameters are either numeric values, equations that evaluate to numbers, or character strings. Character string parameters are always bound by double quotation marks. Equations must be preceded by an equals sign (=).

The pipe symbol (|) in the command syntax indicates that a parameter is optional, and should not be included in your macro unless otherwise noted.

All indices into arrays are 1-based, e.g. Curve1=1 refers to the first curve in a plot.

A 0x prefix for numbers in the descriptions below indicates hexadecimal notation; e.g. 0x0010 = 16.

JR/Viewer indicates that the command is supported by DPlot Jr or DPlot Viewer.
JR/Viewer indicates that the command is NOT supported by DPlot Jr or DPlot Viewer.



JR   Viewer

For a non-zero or omitted state, this command forces DPlot to re-use the current scale factor and extents for 3D scatter plots and 3D contour plots when the plot is redrawn, regardless of any changes in the data extents or the viewing angles. The same scale will be used until a) the plot is closed, b) the user opens either the Contour Options or Scatter Plot Options dialogs, or c) this command is used with state=0. This command is useful for maintaining the scale when producing a series of frames that will subsequently be used to generate an animation. Note that the use of this command may cause a plot to be clipped. To ensure that a plot in a series of viewing angle changes is not clipped, you can first walk through all frames that will be generated and find the frame that results in the smallest scale, then display the plot at those viewing angles before the use of Preserve3DScaleFactor.


char szCmd[128];



for(i=0; i<360; i+=2)




sprintf(szCmd,"[FileSaveAs(\"BMP Picture\",\"c:\\temp\\%03d.bmp\")]",i);




This sequence sets the document window to 640x480 and produces bitmap images with the view azimuth varying from 0 to 358 degrees in steps of 2 degrees, saving those bitmaps to c:\temp. You can then use Windows Movie Maker to import those bitmaps and create an animation. This example (6Mb) on the DPlot web site was generated using the code above.



Page url: