Page 1 of 1

FileSaveAs won't save curren ManualScale

Posted: Fri Nov 03, 2006 11:18 am
by Tom Chien
DPlot_Plot, ManualScale work fine.
FileSaveAs also works fine but it won't take the updated plot after ManualScale.

i [code]f ((DocNum = DPlot_Plot(&DPlot,X,Y,NULL)) <= 0) return -3 ;
if (dPlot_Command(DocNum, "[ManualScale(,-0.08,,0.08)]") <= 0) return -4;
if dPlot_Command(DocNum,"[FileSaveAs(1,\"H:\\FRDSpiP\\DPLOT\\|TITLE1|\")]") <= 0) return -4; [/code]

Posted: Fri Nov 03, 2006 11:55 am
by DPlotAdmin
I tried a test just now and it worked fine for me. Try adding a [ViewRedraw()] after your ManualScale command and see if that makes a difference. It shouldn't, but I've been wrong before.

Posted: Fri Nov 10, 2006 9:17 am
by Tom Chien
I try to give better picture of code as follows:
[code] DPlot.DataFormat = DATA_XYXY; //DATA_XYXY
DPlot.MaxCurves = 1;
DPlot.NumCurves = 1;
DPlot.MaxPoints = m ;
DPlot.NP[0] = DPlot.MaxPoints ;
DPlot.SymbolType[0] = SYMBOLSTYLE_DOT ;
DPlot.LineType[0] = LINESTYLE_NONE ;
sprintf(DPlot.Title[0], "%08daRRR", (int)dsP->no) ;
if ((DocNum = DPlot_Plot(&DPlot,X,Y,NULL)) <= 0) return -3 ; //

if (dPlot_Command(DocNum, "[ManualScale(,-0.08,,0.08)]") <= 0) return -4;

if (dPlot_Command(DocNum,"[FileSaveAs(1,\"H:\\FRDSpiP\\DPLOT\\|TITLE1|\")]") <= 0) return -4;
if (dPlot_Command(DocNum, "[FileClose()]") <= 0) return -5;

[/code] when I go step by step, "ManualScale" is doing OK. After "FileSaveAs" the screen goes back previous one before "ManualScale". And the file saved is previous one before "ManualScale".

Please make another try!

Posted: Fri Nov 10, 2006 10:01 am
by DPlotAdmin
Sorry for the trouble. I found a mistake associated with leaving out parameters to the ManualScale command when those values have not been previously set, either by another ManualScale command or interactively in DPlot. There's nothing you can do to fix this now other than specifying the low and high X values. I'll fix this in the next release.