Hi all.
We've created som code that works fine when doing everything inside AutoCAD. In .NET we execute som lisp-code using resultbuffer etc., and everything works fine as the command we're using has the CommandFlags.Modal set.
However... When running the same function from another program, using WCF, we only get
"Error: Unknown (command-s) failure." on the command line when the lisp-code was about to be executed.
Do you know of a way to fix this? Is there some way to use the CommandFlags.Modal for WCF calls?
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
Hello Trond,
I would not expect it to work if you are using the Application.Invoke to call the Lisp code from the WCF callback. Any Editor.Command calls in application context will not work and (command-s) is the equivalent of it in Lisp.
Please try using "SendStringToExecute" in your WCF callback. The Editor.command or Application.Invoke should work ok in the document context.
The API does provide the "DocumentManager.BeginExecuteInCommandContext" for this purpose, but unfortunately it does not work as expected yet.
We do have this behavior logged in our database and is likely to be addressed soon.
Regards,
Balaji
Hi there,
is there a version availble where "DocumentManager.BeginExecuteInCommandContext" does work?
I'm trying to implement this. but, as you say, "unfortunately it does not work as expected yet."
Thanks
Niels van den Elzen