View previous topic :: View next topic |
Author |
Message |
mlomonaco
Joined: 05 Mar 2007 Posts: 5
|
Posted: Mon Mar 05, 2007 7:30 am Post subject: Adding more than one documents doesn't work |
|
|
Hi there,
I recently upgraded DPlotJr to a newest version, and installed also latest DPlot trial.
I have trouble with creating a new document with the [FileNew()] command: every time I always get the DocNum = 1 (or the active one) and it does not increment itself at each DPlot_Command() call with FileNew directivel. Of course I always pass 0 as DocNum in the creation of the new document. What I need is to update in realtime witgh DPlotLib a different curve on differents windows (DPlot documents)
Any suggestions? I remember that my code worked on older versions...
Thanks
Marco |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Mar 05, 2007 10:05 am Post subject: |
|
|
Quote: | Any suggestions? I remember that my code worked on older versions... |
I may be mistaken but I don't think so. FileNew has always worked pretty much the same way: it returns the document index of an empty document window, not necessarily a new one. If you don't use FileNew until you need it - that is when you've already added data to the currently open documents, then it will work as you expect. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
mlomonaco
Joined: 05 Mar 2007 Posts: 5
|
Posted: Mon Mar 05, 2007 11:16 am Post subject: |
|
|
Ok, so what I understand is:
1) if I DPlot_Command("FileNew" ...) n times and between calls I dont do nothing (nor add points nor change legends/axis params) it could open always the same empty window
2) if I DPlot_Command("FileNew" ...) n times and between each call I add some points then a new window is given every time.
Actually I:
a) DPlot_Command("FileNew" ...) then DPlot_Command("Legends..." ...) and DPlot_Command("Axis..." ...) N-times
b) DPlot_AddData on the N documents in sequence
and as i understand I got this behaviour. A workaoround is to add a dummy point every time i do a FileNew(): could it work?
M. |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Mar 05, 2007 11:22 am Post subject: |
|
|
Quote: | A workaoround is to add a dummy point every time i do a FileNew(): could it work? |
Yes, that will work as you want. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
mlomonaco
Joined: 05 Mar 2007 Posts: 5
|
Posted: Mon Mar 05, 2007 11:38 am Post subject: |
|
|
... yep and it did!
Thank you.
Suggestion: in the manuals according to me this matter is not clear . It could be nice to add some info about how to open multiple windows. |
|
Back to top |
|
|
|