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);
}