I'm having trouble utilizing Tony's Editor.Command() Extension Method
here.
Basically, I have a ContextMenuExtension who's RXClass is Curve, and the MenuItem.Clicked event is attempting to use the PopUp event's PromptSelectionResultResult.Value (a SelectionSet) which is stored to static field, following a call to Editor.SelectImplied() within the PopUp event handler. Then, within the MenuItem.Clicked event handler, I'm attempting to call Editor.Command()... The call is made, no exceptions are thrown, but the command is unsuccessful.
I was using Document.SendStringToExecute(), but I didn't want the history available if/when user hits up arrow. I want to supply a SelectionSet as REVCLOUD does not support implied, nor previous selection, and the last (_L) is parameter is not always correct, AFAIK.
I must be missing something, or simply not supplying the call to Editor.Command() the correct parameters... Please advise.
Example:
private static void onMenuClick(object sender, EventArgs e)
{
Document doc = acDocs.MdiActiveDocument;
Editor ed = doc.Editor;
try
{
using (DocumentLock dl = doc.LockDocument())
{
ed.Command("._revcloud", "_o", ss, "_n");
}
}
catch (Autodesk.AutoCAD.Runtime.Exception ex)
{
ed.WriteMessage(
"\n; error: Autodesk.AutoCAD.Runtime.Exception: {0}\n", ex.Message);
}
}
Basically, I'm attempting to use Editor.Command() in lieu of this LISP:
;; where the implied selection is made during
;; PopUp event handler via Editor.SelectImplied()
;; and this would be evaluated in
;; MenuItem.Click event handler
(command "._revcloud" "_o" ss
"_n") )
TIA