a few c# questions

Q&A for C, C++, and/or C# developers using DPlot
Post Reply
kustnodi
Posts: 2
Joined: Mon Jun 09, 2008 6:27 pm

a few c# questions

Post by kustnodi »

I have created a windows control to ease using DPlotJr to plot data in a program I have. I have run into a sporadic error from DPlot and was wondering if you could point me in the right direction. When loading my control occasionally I get a messagebox that pops up and says

"Timeout error, current timeout value=20000 msec"

Do I need to send DPlot a periodic command to keep it from timing out?

I'm gonna roll another question into here. I used to be able to hide DPlot when calling DPlot_Start(1, &state) but it no longer stays hidden and was wondering why. Anyways thank you all for any help on either issue :)

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

Post by DPlotAdmin »

"Timeout error, current timeout value=20000 msec"

Do I need to send DPlot a periodic command to keep it from timing out?
You shouldn't ever get that error unless you've truly been waiting 20 seconds for a response from DPlot. If you have been waiting 20 seconds then the problem is likely that you're plotting a very large 3D surface plot (no other plot should take anywhere near 20 seconds). If you'll let me know exactly what you're doing at the time this error occurs I imagine that would be helpful.
...but it no longer stays hidden and was wondering why.
Umm... me too. If DPlot is already running (hidden or not) then no DPLOTLIB functions should cause it to become visible, other than of course DPlot_Command(0,[AppShow()]); The only thing I can think of off the top of my head is that DPlot is being closed at some point (possibly, and crossing my fingers that this isn't the problem, because it crashes), and the next call to a DPLOTLIB function causes it to start up visible.

If it's possible for you to send me what you have that would probably be helpful.
Visualize Your Data
support@dplot.com
kustnodi
Posts: 2
Joined: Mon Jun 09, 2008 6:27 pm

Post by kustnodi »

Sorry I didn't heed your advice and post my example. I have made a control library wrapped around your dplotlib for various different plot types in DPlot. While the library eases the use in .NET languages to interact with DPlot it is buggy. I did find the problem though and figured I'd share in case someone else asks you the same thing.

I was trying to create a DATA_3D plot and only had a single point in either the X or Y direction (or both) and when you enter the grid cells into either MaxCurves or MaxPoints that turns out to be zero which DPlot does not like.

My timeout never occured the first time I plotted a contour but the subsequent times when I tried to use DPlot again after the 20s timeout period. I also gather that when you enter in the grid cell size at zero it causes DPlot to pop up.

I hope that explanation made sense and I always appreciate your quick responses and love DPlot :)
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

That's a good catch, thanks for the information. I'll at the very least check for MaxCurves/MaxPoints being 0 and gripe in that case.

You might prefer using DATA_3DR - it's a little better suited to adding points as you go.
Visualize Your Data
support@dplot.com
Post Reply