﻿ Transferring data > Transferring DPlot data to other applications
 Navigation:  Transferring data > Transferring DPlot data to other applications 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.

System Topics

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!DecimalSymbol Decimal symbol character used by DPlot on input; typically a period or a comma. =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:

where <control> is a text box or label.

Document Topics

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 you open the DPlot file c:\my data\squares.grf, then the following request items can be used to request information about that plot:

 Request Item Returns Curve001 1         1 2         4 3         9 4        16 DecimalSymbol Decimal symbol assumed by DPlot. Typically . or ,. FileName c:\my data\squares.grf FileTitle squares.grf (text appearing in the plot title bar) fname squares (filename minus the extension) Formats TEXT LastCurveFit Presents the last curve fit solution obtained via Generate>Polynomial Curve Fit. For example with squares.grf: y = C(0) + C(1)*x + C(2)*x^2 + ... Coefficients C(00) = 0 C(01) = 0 C(02) = 1   Correlation coefficient is 1   Standard error about the line = 0 Legend(n) Legend title for n=0 or legend entry for curve n (n = 1 through number of curves) ListPeaks Curve 1 Minimum = 1 at X = 1 Maximum = 16 at X = 4 Mean = 7.5 Standard deviation = 6.557439 Standard error = 0 MaxCurves maximum number of curves MaxPoints maximum number of points/curve NumberOfCurves 1 NumberOfPoints 4 Path c:\my data\ (folder location of the saved plot, including a trailing backslash) Titlen (n=1-4) Title lines TopicItemList Formats MaxCurves MaxPoints NumberOfCurves NumberOfPoints TopicItemList Curve01 Version Version number of DPlot or DPlot Jr, e.g "2.3.5.3" XAxisLabel X axis label YAxisLabel Y axis label ZAxisLabel Z axis labelLas

To retrieve this information in Excel, use a formula of the form "=application|topic!item". The "application" in all cases is "DPlot". The "topic" is the file title of a plot (the text appearing  in the document title bar. To retrieve the X axis label from squares.grf, for example, use "=DPlot|squares.grf!XAxisLabel".

If interacting with DPlot via the DPLOTLIB DLL, all of the information shown above can be retrieved with a call to DPlot_Request. For example, to retrieve the character used as a decimal symbol in C:

char sDecimal;

int dwSize=sizeof(sDecimal);

DPlot_Request(0,"DecimalSymbol",sDecimal,&dwSize);

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.

____________________________
{"ft_lang_label":"__label__en","ft_lang_prob":0.7679398,"math_prob":0.8421149,"size":5803,"snap":"2021-21-2021-25","text_gpt3_token_len":1485,"char_repetition_ratio":0.13398862,"word_repetition_ratio":0.0043907794,"special_character_ratio":0.24366707,"punctuation_ratio":0.12761904,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95441574,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,null,null,null,null,null,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-17T04:12:37Z\",\"WARC-Record-ID\":\"<urn:uuid:abf6409b-7219-47fe-b999-230e3b270738>\",\"Content-Length\":\"33549\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:38cee834-50a1-4ea0-8808-ce10bb7286f7>\",\"WARC-Concurrent-To\":\"<urn:uuid:7a79740f-5d73-4e04-b17b-378ac3eb25d8>\",\"WARC-IP-Address\":\"216.146.219.222\",\"WARC-Target-URI\":\"https://www.dplot.com/help/helpid_exportdata.htm\",\"WARC-Payload-Digest\":\"sha1:BT5Z6CW7SE54PPQSEPLFBBRIMQVWSYPD\",\"WARC-Block-Digest\":\"sha1:RGZZZMQZATHSRGPOAN7ZATHSFQKZCR2L\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243991557.62_warc_CC-MAIN-20210517023244-20210517053244-00100.warc.gz\"}"}