Adding more than one documents doesn't work

Found a bug? Tell us about it here

Moderator: DPlotAdmin

Post Reply
mlomonaco
Posts: 5
Joined: Mon Mar 05, 2007 7:24 am

Adding more than one documents doesn't work

Post by mlomonaco »

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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

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
mlomonaco
Posts: 5
Joined: Mon Mar 05, 2007 7:24 am

Post by mlomonaco »

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.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

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
mlomonaco
Posts: 5
Joined: Mon Mar 05, 2007 7:24 am

Post by mlomonaco »

... 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.
Post Reply