View previous topic :: View next topic |
Author |
Message |
simply
Joined: 25 Sep 2006 Posts: 40
|
Posted: Tue Nov 11, 2008 1:29 pm Post subject: use a same document |
|
|
Hi David,
Is there a way to use an existing document(if exists) to create a new plot????
I don't want to call DPlot_Command(DocNum, "[FileClose()]"), unless the program is closed.
________
Last edited by simply on Mon Sep 12, 2011 2:08 pm; edited 2 times in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Tue Nov 11, 2008 3:08 pm Post subject: |
|
|
I'm not sure I understand your question. If you want to add a curve to an exiting XY plot then you should call DPlot_AddData rather than DPlot_Plot or any of its derivatives. If instead you're talking about a) replacing existing curves in an XY plot but keeping all of the plot settings or b) replacing a 3D surface with a new 3D surface but, again, keeping all of the plot settings, then probably the best way to do that is with [SavePreferences("filename")], [DPlotPlot(....)], [GetPreferences("filename")].
If I've misunderstood what you're trying to do please let me know. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
simply
Joined: 25 Sep 2006 Posts: 40
|
Posted: Tue Nov 11, 2008 4:14 pm Post subject: |
|
|
I don't want to add a curve, I want to plot a new one.
If I execute 2 programs that use dplot, when I close one of them, I call dplot_stop, and dplot is closed, and if the second program try to plot a new graph dplot is opened in visible mode. All my programs close documents after creating them(without saving files).
Dplot is closed cause there is no opened files, so i have two possible solutions.
1) I don't close a file after using it, but i use the same file(document) each time).
2) to oblige dplot start hidden by default???may be there is something to put in the ini file????
________
Last edited by simply on Mon Sep 12, 2011 2:08 pm; edited 2 times in total |
|
Back to top |
|
|
simply
Joined: 25 Sep 2006 Posts: 40
|
Posted: Thu Nov 13, 2008 10:39 am Post subject: |
|
|
is there a solution???
________
Last edited by simply on Mon Sep 12, 2011 2:09 pm; edited 2 times in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Thu Nov 13, 2008 10:45 am Post subject: |
|
|
Sorry - this is getting more, rather than less, confusing for me. It sounds like you don't so much care that a new curve is placed in a new document, you just don't want DPlot to be visible when that happens. Is that correct? If so, just have your second program start DPlot hidden in the same way that your first program did, with DPlot_Start(1,WasActive) _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
simply
Joined: 25 Sep 2006 Posts: 40
|
Posted: Thu Nov 13, 2008 11:03 am Post subject: |
|
|
Sorry for confusion, i "still" have to improve my english
DPlotAdmin wrote: | Sorry - this is getting more, rather than less, confusing for me. It sounds like you don't so much care that a new curve is placed in a new document, you just don't want DPlot to be visible when that happens. Is that correct? If so, just have your second program start DPlot hidden in the same way that your first program did, with DPlot_Start(1,WasActive) |
Yes, I want dplot to remain hidden after the first program is closed(the 2 program were opened).
Of course I start dplot with DPlot_Start(1,WasActive), but the problem is that when dplot is closed(by my first program), and after that my second program call a new dplot command, then dplot is re-opened unhidden.
PS:My programs create a plot than close the file after getting the plot in the pictureBox, so when the first program call dplot_stop, there is no opened file, so dplot is closed, even if there is other programs that still can use it.
________
Last edited by simply on Mon Sep 12, 2011 2:08 pm; edited 2 times in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Thu Nov 13, 2008 11:44 am Post subject: |
|
|
Your English is fine, please don't worry about that.
Quote: | ...but the problem is that when dplot is closed(by my first program), and after that my second program call a new dplot command, then dplot is re-opened unhidden. |
In the 2nd program check to see if DPlot is open before calling DPlot_Plot (or whatever other function you're using). The return value of DPlot_Start is the window handle for the application. You can check to see if that window is still open with IsWindow(hwndDPlot). That isn't entirely reliable as some other application might reuse the window handle after DPlot is closed. A better way is with FindWindow("DPLOT",0&) (or FindWindow("DPLOTJR",0&) in the case of DPlot Jr). If FindWindow returns 0, you know DPlot has been shut down. If so, start it with DPlot_Start(1,WasActive). _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
simply
Joined: 25 Sep 2006 Posts: 40
|
Posted: Thu Nov 13, 2008 12:10 pm Post subject: |
|
|
DPlotAdmin wrote: | A better way is with FindWindow("DPLOT",0&) (or FindWindow("DPLOTJR",0&) in the case of DPlot Jr). If FindWindow returns 0, you know DPlot has been shut down. If so, start it with DPlot_Start(1,WasActive). |
It works, thanks
________ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|