Page 1 of 1

Select multiple curves simultaneously?

Posted: Wed Aug 14, 2013 1:03 pm
by dcl9000
Is there a way to use SelectCurve(...) macro function to select multiple curves simultaneously, but not all of curves in a plot?

Something like this SelectCurve(1,3,5) to select curves 1, 3, and 5 for further operation.

Posted: Wed Aug 14, 2013 1:17 pm
by DPlotAdmin
No, but that's a good idea, thanks.

SelectCurve(...) macro problem

Posted: Wed Aug 14, 2013 1:42 pm
by dcl9000
OK. Now here's another prolem.

I use SelectCurve(LegendHas(...)) macro to select a specific curve based on the legend for further operation. But it's always the first cuvre in my plot being selected no matter what string I put in the LegendHas(...). Any trick to make this work?

I found SelectCurve(3) also selects the first curve only!? Any idea?

Posted: Wed Aug 14, 2013 4:12 pm
by DPlotAdmin
No, on either. Please save your graph as a DPlot file and send it to me. Also let me know what command you're trying to use after SelectCurve. It may be that SelectCurve works correctly, but the subsequent command is ignoring that setting.

SelectCurve(...) macro problem

Posted: Wed Aug 14, 2013 4:28 pm
by dcl9000
This is what I did:

[SelectCurve(1)]
[EditOperateY("Y/17*9.1")]

[SelectCurve(3)]
[EditOperateY("Y/17*9.1")]

The two operations on Y both changed the value of curve-1, not on curve-3. I will send you the plot soon.

Posted: Wed Aug 14, 2013 10:33 pm
by DPlotAdmin
Thanks for the file. I'll take a look and address this as soon as possible.

SelectCurve(...) macro problem

Posted: Thu Aug 15, 2013 12:40 pm
by dcl9000
Just found out that the two macro commands (SelectCurve, EditOperateY) cannot be sent separately for what I wanted to do. Everything works fine now when I concatenate them and send as a whole command string together.

[SelectCurve(LegendHas("abc"))][EditOperateY("Y/17")] <-- works on one curve w/ lengend "abc"

[SelectCurve(LegendHas("xyz"))][EditOperateY("Y/10")] <-- works on the other curve w/ lengend "xyz"

The macro command [EditOperateY(...)] along always changes the first curve in the plot.

Is it how this command was designed to operate? If not, could you please fix it in the coming release? Thanks!

Posted: Thu Aug 15, 2013 1:08 pm
by DPlotAdmin
That's by design. I assumed you were running a DPlot macro rather than sending commands from some other program. When running a macro, the DDE conversation is left open until the macro terminates, and nothing gets reset. On the other hand, DPlot_Command starts a conversation, sends the command, and terminates the conversation. Every new conversation results in a lot of things (curve selection in particular) being initialized. It's a bit inconvenient but it prevents multiple programs (or even the same program) from running over each other.

SelectCurve(...) macro problem

Posted: Tue Aug 20, 2013 12:58 pm
by dcl9000
OK. Please add a notice in the manual or help info in the next release to prevent this issue.

However, I did send the commands from another program (C), not just running the macros.

Posted: Tue Aug 20, 2013 1:16 pm
by DPlotAdmin
Will do. I know it's in there somewhere but notably is not there in the description of the SelectCurve command. That's a whoops.