How does work the undocumented
RemovingAutoLISP function of AutoCAD 2009? I supposed that this function locks the AutoLISP using.
From Dependency Walker:
bool RemovingAutoLISP(void)
I have written such code:
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);
}
}
}
I get the result:
The result of RemovingAutoLISP calling: True
But when I put the LISP commands into console of AutoCAD (after working of my code) it works still.