.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutocAD crash when open file

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
265 Views, 0 Replies

AutocAD crash when open file

Autocad Ver:2012.My code:
namespace testCADOpen { public class Class1 { [CommandMethod("openfile")] public void openFile() { DocumentCollection acDocMgr = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager; string strFileName = @"E:\test.dwg"; if (File.Exists(strFileName)) { acDocMgr.Open(strFileName, false); } } } }

test.jpg

 

triggle the err  message when debug in visual studio.(1.start vs,2 start debug ,3 netload testCADOpen.dll 4 openfile, Err)

It's no problem when netload the dll from Auocad directly.(1. start AutoCAD ,2 netload testCADOpen.dll 3 openfile, Ok)

 

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost