public sealed class Commands {
#if AUTOCAD_2009
private const String removingAutoLISP = "?RemovingAutoLISP@@YA_NXZ";
#endif
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,
CharSet = CharSet.Unicode, EntryPoint = removingAutoLISP)]
private static extern Boolean RemovingAutoLISP();
[CommandMethod("Test01")]
public void Test01() {
Document doc = cad.DocumentManager.MdiActiveDocument;
if (null == doc)
return;
Editor ed = doc.Editor;
Database db = doc.Database;
try {
Boolean result = RemovingAutoLISP();
ed.WriteMessage("The result of RemovingAutoLISP calling: {0}",
result.ToString());
}
catch (System.Exception ex) {
ed.WriteMessage(ex.Message);
}
}
}