WritetoCommandLine? asynchronous or synchronous?

WritetoCommandLine? asynchronous or synchronous?

Anonymous
Not applicable
597 Views
2 Replies
Message 1 of 3

WritetoCommandLine? asynchronous or synchronous?

Anonymous
Not applicable

does the function Autodesk.AutoCAD.Internal.Utils.WriteToCommandLine(..) work asynchronous like SendToExecute(..) or synchronous like Doc.SendCommand(..)?

Anyplace I can find more info on this class?

Thanks

-GP

 

0 Likes
Accepted solutions (1)
598 Views
2 Replies
Replies (2)
Message 2 of 3

autodaug
Autodesk
Autodesk
Accepted solution

It calls SendStringToExecute(). The Internal namespace is not part of the public API and is not intended to be used by 3rd party developers. These classes aren't supported or documented and may change without warning.

 

That being said, here is an old post from Kean where he used a function (Utils.AddCommand) from the Internal namespace out of necessity:

 

http://through-the-interface.typepad.com/through_the_interface/2009/03/using-ironpython-with-autocad...

 

Also, if you're up for reading assembly language, and if the .NET dll is not obfuscated, then you might be able to figure out some of its logic by disassembling it:

 

     "ildasm acmgd.dll /out:acmgd.asm"

 

 

 

0 Likes
Message 3 of 3

FRFR1426
Collaborator
Collaborator

Don't know why you want to use this instead of Editor.WriteMessage, but the latter is asynchronous. To force the update of the screen, you have to put a newline character at the end of the message and call DoEvents just after the call to WriteMessage :

 

ed.WriteMessage("Your message\n");
System.Windows.Forms.Application.DoEvents();

And if you want to see what's in there, you can use Telerik JustDecompiler (it's free): http://www.telerik.com/products/decompiler.aspx. There is also DotPeek from JetBrains: https://www.jetbrains.com/decompiler/. For me JustDecompiler is faster and more reliable.

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
0 Likes