在theswamp看过你的贴了:) 总结下,解决方案如下 1、引用acmgdinternal.dll Autodesk.AutoCAD.Internal.Utils.TextScr() Autodesk.AutoCAD.Internal.Utils.GraphScr() 2、P/Invoke [DllImport("acad.exe")] private static extern int acedTextScr(); [DllImport("acad.exe")] private static extern int acedGraphScr(); public static bool DisplayTextScreen { set { if (value) acedTextScr(); else acedGraphScr(); } } [CommandMethod("ts1")] public static void tt1() { DisplayTextScreen = true; }
[CommandMethod("ts2")] public static void tt2() { DisplayTextScreen = false; } 3、AutoCad2010最简单 Application.DisplayTextScreen = true; |