下面是飞狐版主曾经写的 获得命令行字符串!
var ed = Application.DocumentManager.MdiActiveDocument.Editor;
var strs = Autodesk.AutoCAD.Internal.Utils.GetLastCommandLines(4, false);
for (int i = 0; i < strs.Count; i++ )
{
ed.WriteMessage("\n第{0}行:{1}", i+1, strs[i]);
}
你想获得一行字符的把.GetLastCommandLines(1, false);改成1