Page 1 of 1

MaxCurves and MaxPoints

Posted: Tue Jul 06, 2004 5:07 pm
by Code-Breaker
Hi David,

I notice that the latest version has dde commands MaxCurves and MaxPoints - Thanks!

But how do I use them?

Here's how I get on with Matlab:

h = ddeinit('DPlot','System');
rc = ddeexec(h,'[SelectCurve(2)]');

...and I have tried, for example:

curves = ddeexec(h,'MaxCurves');

but this throws the DPlot error:

Error processing this command:
'MaxCurves'

What am I doing wrong? Thanks, Chris

Posted: Tue Jul 06, 2004 5:48 pm
by DPlotAdmin
I've no idea how to do an XTYP_REQUEST transaction in Matlab. In VB this is a LinkRequest, using DPLOTLIB.DLL you'd use DPlot_Request. If the feature exists in Matlab it is likely called something like dderequest. (Gearhead talk: Your ddeexec function ends up being a XTYP_EXECUTE DDE transaction, which can only send information (like command strings) and receive a confirmation or error code - it can't retrieve application data.)

To make things slightly more complicated, DPlot responds to all XTYP_REQUEST transactions with a character string. So if/when you find Matlab's equivalent to XTYP_REQUEST you need to keep in mind that the returned value is a character string, not an integer.

Let me know if you run into any stumbling blocks on this.

Posted: Tue Jul 06, 2004 6:06 pm
by Code-Breaker
That was just enough info to get me going. I did a google search on "matlab XTYP_REQUEST" and found an example (from among ALL 3 matches returned) that used the command 'ddereq', and this does the job. Thanks, Chris