i using visual studio 2010 , having .dwg file want open in autocad. till have used this.
process p = new process(); processstartinfo s = new processstartinfo("d:/test file/" + filename); p.startinfo = s; p.start(); but want close file inside autocad not autocad itself. (means atocad.exe should kept running).
till hve used closing acad.exe not file.
foreach (process proc in process.getprocesses()) { if (proc.processname.equals("acad")) { proc.closemainwindow(); proc.kill(); } }
take autocad .net libraries autodesk sites (http://usa.autodesk.com/adsk/servlet/index?id=773204&siteid=123112)
then able use application , document classes. give full control on opening , closing documents within application.
you can find many articles on that, , can ask further questions.
Comments
Post a Comment