TheSwamp
Code Red => .NET => Topic started by: nobody on September 03, 2015, 12:13:57 AM
-
Okay...so this is a pretty noobish question but I've avoided using ed.Command() forever simply because I have always got the error in the attached image. Can someone please clue me in to what reference I need to load and what "using" i should be using :) Thank you!
-
Means Editor Object does not contain a method named Command.
Your using older version or missing a reference, or never created a extension method for it.
-
Means Editor Object does not contain a method named Command.
Your using older version or missing a reference, or never created a extension method for it.
Right...need to know which reference :)
I thought maybe interop or interop common but guess those aren't it.
-
internal const char ESC = '\x1B';
internal const char RETURN = '\xD';
internal static void SendCommandToCommandLine(string Command, bool Escape = true) {
string EscapeString = string.Empty;
if (Escape == true) { EscapeString = ESC.ToString() + ESC.ToString(); }
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute(EscapeString + Command + RETURN, true, false, true);
}
-
internal const char ESC = '\x1B';
internal const char RETURN = '\xD';
internal static void SendCommandToCommandLine(string Command, bool Escape = true) {
string EscapeString = string.Empty;
if (Escape == true) { EscapeString = ESC.ToString() + ESC.ToString(); }
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute(EscapeString + Command + RETURN, true, false, true);
}
Thanks! I'll give that a shot :)
-
Is Editor.Command() perhaps not a 2014 item?
-
The Editor Command() and CommandAsync() methods were introduced in the 2015 API. So if coding for, or targeting, an earlier release you won't have those methods available.
-
The Editor Command() and CommandAsync() methods were introduced in the 2015 API. So if coding for, or targeting, an earlier release you won't have those methods available.
Awe! That's it bahaha...Was driving me crazy :)
Thanks!!