Not sure using _amsaDirectPlot makes sense - that's rather private. Better would be to use the same callback the menu uses, which is sevDirectPlot(). For example:
session=sevSession(hiGetCurrentWindow())eval(sevWindow(session)->hiForm)->artistPlottingMode->value="Append" ; this sets the plotting mode on the ADE windowsevDirectPlot(session 'asiiPlotTranSignalCB)
That should then plot in append mode.
My bindkey is
hiSetBindKey("Schematics" "Ctrl<Key>4" "load(\"path to file\")")
file is the code given above.
Rather than loading a file every time you hit the bindkey, far better and more elegant to define a function:
session=sevSession(hiGetCurrentWindow()) eval(sevWindow(session)->hiForm)->artistPlottingMode->value="Append" ; this sets the plotting mode on the ADE window sevDirectPlot(session 'asiiPlotTranSignalCB)
hiSetBindKey("Schematics" "Ctrl<Key>4" "MYappendSignal()")
Hi Andrew, long time no see...
This had worked perfectly for me until a Virtuoso update replaced ADE-L with maestro. Is there a quick fix for that?
Looking back, it was rather a hack. Not sure this response will be much better and I can't guarantee this won't change. The simplest would be to set the ADE default plotting mode before you start ADE by doing:
envSetVal("asimenv.plotting" "artistPlottingMode" 'string "Append")
If you need to force it during the session, then this is assuming you're using Explorer (with Assembler there's no real equivalent because you would need to know which test you are getting results for). However, it would be:
session=sevSession(hiGetCurrentWindow())toolbar=deFindToolbar("Plotting" hiGetSessionWindow(sevWindow(session)))toolbar->axlPlotMode->value="Append"sevDirectPlot(session 'asiiPlotTranSignalCB)
So it's really just the bit that changes the plotting mode to append that needs to change (that could be combined into a single line if you wanted).
Thanks Andrew, it works perfect! Till next update...
Hi Andrew,I'm trying to get this working too in ADE Explorer. sevWindow(session) returns nil (in my case session is set to sevSession17). I don't see any documentation for sevWindow. I did see in the hiGetSessionWindow() description the swindow() function but that takes an integer and I don't know what the best way to get the session number is, I believe that in my case it is 1.How would this function work nowadays?
Also, why is the sevDirectPlot() function not using the "Append" mode from the toolbar? If I use the menu I see sevDirectPlot('sevSession1 'asiiPlotTranSignalCB) which takes notice of the plotting mode. I'm assuming that session is not evaluating to 'sevSession1 and this is actually a coding error in the MYappendSignal procedure that is posted.
I don't know why this isn't working - it's odd, because if the session=sevSession(hiGetCurrentWindow()) is working, then I would expect sevWindow(session) to return the window for the Explorer window.
The code above definitely worked when I tried it, but it's absolutely a hack - and when it works, the plot mode for the function should be honoured. The MyAppendSignal is from 11 years ago and was for ADE L, so that code can't be used anyway as-is.