dPlot_Command FileSaveAs

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
Tom Chien
Posts: 11
Joined: Thu Sep 15, 2005 8:57 am

dPlot_Command FileSaveAs

Post by Tom Chien »

It comes with compiling error(syntax error : missing ')' before identifier 'Tab' when I run
[code]dPlot_Command(DocNum,"[FileSaveAs("Tab-separated values",Filename)]");
After I changed parameter 1 to be numbers like 1, it works.
Question: what is value for "Tab-separated values"?

Shall I add 1 to DocNUm if selecting new document after run
[/code]dPlot_Command(DocNum,"[GenerateMesh(119,119,0,0,29,29,0,0,4)]"); ?


Appreciate this [b]user friendly, right to fit my plot needs and fastest service [/b]in the world software!

Tom
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

After I changed parameter 1 to be numbers like 1, it works.
Question: what is value for "Tab-separated values"?
14. The documentation hasn't kept up. Thanks for pointing this out.
Shall I add 1 to DocNUm if selecting new document after run
[/code]dPlot_Command(DocNum,"[GenerateMesh(119,119,0,0,29,29,0,0,4)]"); ?
Usually, but not necessarily. For example if you open 3 documents and close #2, then run the above on DocNum=3, then the new graph will be DocNum=2. The only reliable way to get the DocNum for the new document is to request that information from DPlot:

Code: Select all

char   szText[32];
DWORD  dwSize;
dwSize = sizeof(szText);
DPlot_Request(0,"LastNewDocNum",szText,&dwSize);
DocNum = atol(szText);
Visualize Your Data
support@dplot.com
Tom Chien
Posts: 11
Joined: Thu Sep 15, 2005 8:57 am

dPlot_Command FileSaveAs

Post by Tom Chien »

Thanks.
I tried [code]dPlot_Command(DocNum,"[FileSaveAs(1,Filename]");
It promps "Error Processing Command [FileSaveAs(1,Filename]" at DPLOT
What shall I do to makt it right?

or I tried [/code],"[FileSaveAs(1,"ex01.grf"]");
Compliling error shown "syntax error : missing ')' before identifier 'ex01'"

Tom
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

You need to give attention to where the quotation marks go. This is a bit confusing in VB and C because a double quotation mark is used both for the entire command string and to delineate character string arguments within the command.

In VB:
ret=DPlot_Command(DocNum,"[FileSaveAs(1,""ex01.grf"")]")

In C:
ret=DPlot_Command(DocNum,"[FileSaveAs(1,\"ex01.grf\")]");

In Fortran:
ret=DPlot_Command(DocNum,'[FileSaveAs(1,"ex01.grf")]'c)
Visualize Your Data
support@dplot.com
Post Reply