3DR dPlot_ZFromXY and AddData command

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
Tom Chien
Posts: 11
Joined: Thu Sep 15, 2005 8:57 am

3DR dPlot_ZFromXY and AddData command

Post by Tom Chien »

David,

1. I tried to run AddData fast for repeated process by [code]dPlot_AddData(DocNum, DATA_3DR, 900, 1, NULL, X) ;
dPlot_Command(DocNum,"[GenerateMesh(120,120,-0.5,-0.5,29.5,29.5,0,1,4)]") ;
DocNum++ ;
dPlot_Command(DocNum,"[FileSaveAs(1,\"surfaceMax.grf\")]") ;
dPlot_Command(2, "[FileClose()]")[/code]
Run the code repeatedly will get some orderly (partial) error data either at plot1 or plot2. If I add [code]
dPlot_Command(1, "[FileClose()]") <= 0)
[/code], then it works perfect.
What my app does is to completely modify whole data set by using AddData. I am not hurry on this issue. It just take one command more but seems to me not logical, do you?

2. This one is quite essential for me. I used
[code]dPlot_AddData(1, DATA_3DR, 3360, 1, NULL, sdgZone.data) ;
dPlot_ZFromXY(DocNum, fgd[dmax].gridNo % 120, 2 + (double)fgd[dmax].dayOffset/60, &fgd[dmax].data) ;
[/code] It gave return code (-2) for "ZFromXY". Then I tried[code]
dPlot_Plot(&DPlot, NULL, sdgZone.data, NULL) ;
dPlot_ZFromXY(DocNum, fgd[dmax].gridNo % 120, 2 + (double)fgd[dmax].dayOffset/60, &fgd[dmax].data) ;[/code] It runs perfect.
But the data I get is linear Z value between 2 points as manual describes. Does any way to get contour value shown on the display instead of linear since that is the real purpose od 3DR? If this case resolved some app which needs only some Z value will not go for GenerateMesh which is very expensive way.
Thanks your product and your time again!

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

Post by DPlotAdmin »

1. I'm not completely sure I understand what is going on there, but if your code appears exactly as you've shown and you aren't resetting DocNum to 1 at the top of the loop, then you're continuously incrementing it so that you're creating a new (additional) document with every pass. So you'd get an error after the 31st or 32nd loop.

2. That's a good suggestion, but not something I'm prepared to do in a hurry. I'll add it to my to-do list.
Visualize Your Data
support@dplot.com
Tom Chien
Posts: 11
Joined: Thu Sep 15, 2005 8:57 am

Post by Tom Chien »

David,

Thanks for the promp answer at "2".
About "1", I did try[code]dPlot_AddData(1, DATA_3DR, 900, 1, NULL, X) ;
[/code]. Please try if you have time.

Tom
Post Reply