There are two methods for transferring DPlot data to other applications.
Copy data to the Clipboard.
You can copy the data values of a single curve to the Clipboard, then paste the data in the target application. See Copy Data Values command.
Use target application's DDE features.
If the target application can serve as a Dynamic Data Exchange (DDE) client, you can instruct DPlot to provide application information and/or data for one or more curves. The following Microsoft Excel formulas may be used to request information from DPlot:
Formula |
Returns |
=DPlot|System!Topics |
XYPlot |
|
System |
|
Plot title(s), if any |
=DPlot|System!SysItems |
Topics |
Or |
SysItems |
=DPlot!System!TopicItemList |
Formats |
|
Status |
|
TopicItemList |
|
Help |
=DPlot|System!Formats |
TEXT |
=DPlot|System!Status |
Ready or Busy |
=DPlot|System!Help |
See DPlot Help... "Transferring DPlot data to other applications" |
=DPlot|System!DocumentNumber |
Index of the document associated with this DDE conversation, 1-32 |
=DPlot|System!NumberOfDocuments |
Number of open document windows. |
=DPlot|System!LastNewCaption |
Returns the most recently set document caption (generally the caption for the most recently created document) |
=DPlot|System!LastNewDocNum |
Similar to LastNewCaption; returns the document index (1-32) of the most recently created document. |
=DPlot|System!Version |
DPlot version number |
=DPlot|System!LastCurveFit |
Returns the polynomial curve fit last generated by using the Polynomial Curve Fit menu command or by a CurveFit macro/DDE command. |
NOTE: For formulas that return more than one value, with values separated either by tabs (e.g. TopicItemList) or carriage returns (e.g. LastCurveFit), you must first select the desired cells in the worksheet, enter the formula, then press <Ctrl>+<Shift>+<Enter>.
The syntax in Visual Basic programs for the above commands is:
<control>.LinkTopic="DPlot|System"
<control>.LinkMode=2
<control>.LinkItem=<item to retrieve, e.g. "NumberOfDocuments">
<control>.LinkRequest
<control>.LinkMode=0
where <control> is a text box or label.
In addition, if one or more plots are currently open, you can use the target application's DDE features to request information about those plots. For example, if there is a plot entitled SQUARES.GRF in DPlot, then the following Excel formulas can be used to request information about that plot:
Formula |
Returns |
|
=DPlot|SQUARES.GRF!TopicItemList |
Formats |
|
|
MaxCurves |
|
|
MaxPoints |
|
|
NumberOfCurves |
|
|
NumberOfPoints |
|
|
TopicItemList |
|
|
Curve01 |
|
=DPlot|SQUARES.GRF!Formats |
TEXT |
|
=DPlot|SQUARES.GRF!MaxCurves |
maximum number of curves |
|
=DPlot|SQUARES.GRF!MaxPoints |
maximum number of points/curve |
|
=DPlot|SQUARES.GRF!NumberOfCurves |
1 |
|
=DPlot|SQUARES.GRF!NumberOfPoints |
4 |
|
=DPlot|SQUARES.GRF!ListPeaks |
Curve 1 Minimum = 1 at X = 1, Maximum = 16 at X = 4 |
|
=DPlot|SQUARES.GRF!Curve001 |
1 |
1 |
|
2 |
4 |
|
3 |
9 |
|
4 |
16 |
=DPlot|SQUARES.GRF!Titlen (n=1-4) |
Title lines |
|
=DPlot|SQUARES.GRF!XAxisLabel |
X axis label |
|
=DPlot|SQUARES.GRF!YAxisLabel |
Y axis label |
|
=DPlot|SQUARES.GRF!ZAxisLabel |
Z axis label |
|
=DPlot|SQUARES.GRF!Legend(n) |
Legend title for n=0 or legend entry for curve n (n = 1 through number of curves) |
|
The plot title is the text that appears in the caption of the plot window. To retrieve the caption of the last document created, you can use the LastNewCaption request mentioned above. For example, if your application uses DPlot to produce Histograms, the first plot produced will have a caption of ‘Histogram’. The 2nd histogram (assuming the 1st one is still open) will have a caption of 'Histogram1', the 3rd a caption of 'Histogram2', etc. However, there is no good way for you to determine programmatically whether an end user might have closed a document that your application produces, so it is all but impossible to predict what the caption of a new document might be. If you use LastNewCaption immediately after taking some action that produces a new document, you can be assured that the return value is the caption you are interested in. You can also retrieve the document index (a number, 1-32) of the last document created by requesting LastNewDocNum, which is more useful for programs using DPLOTLIB's DPlot_Command and other functions. To request the above information knowing the document index but not the document's caption, you can use the form Doc<n> for the DDE topic, where n is the document index (1-32).
Data values submitted by DPlot are separated by <TAB> characters. A <CR><LF> sequence separates X,Y pairs and the LastCurveFit output.
Page url: http://www.dplot.com/help/index.htm?helpid_exportdata.htm