How to close a file in Autocad using C# keeping acad.exe running?

后端 未结 6 1602
执念已碎
执念已碎 2020-12-19 19:32

I am using visual studio 2010 and I am having a .DWG file which I want to open in autocad. Till now I have used this.

Process p = new Process();
ProcessStart         


        
6条回答
  •  温柔的废话
    2020-12-19 20:22

    Also, you shouldn't use Kill unless the process has become unresponsive and certainly not immediately after CloseMainWindow.

    CloseMainWindow is the polite way to ask an application to close itself. Kill is like pulling the power lead from the socket. You aren't giving it the chance to clean up after itself and exit cleanly.

提交回复
热议问题