Message 1 of 7
How to wait for a command to execute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to execute the command "doc.SendStringToExecute((string)button.CommandParameter + "PDFATTACH", true, false, true);" or "doc.SendStringToExecute((string)button.CommandParameter + "PDFIMPORT", true, false, true);"
// some code after this
I want to execute the above lines completely and the next code should execute. Now it is not working as expected. I tried thread.sleep, task, async-await, but couldn't work for me.
Document doc = aCAD_App.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
"ed.CommandAsync("PDFATTACH", true, false, true);"
This also not worked.(I am trying to attach pdf in empty document)
also,
Please suggest me any solution for this