AutoCAD freezes on DocumentManager.Open() when debugging in Visual Studio

AutoCAD freezes on DocumentManager.Open() when debugging in Visual Studio

ottosson_mathias
Advocate Advocate
447 Views
0 Replies
Message 1 of 1

AutoCAD freezes on DocumentManager.Open() when debugging in Visual Studio

ottosson_mathias
Advocate
Advocate

I want to open a file in the editor. But for some reason AutoCAD freezes on file open when debugging in Visual Studio. If I do not run the command while debugging it works just fine!

 

[CommandMethod("MyCommand", CommandFlags.Session)]
public void OpenFile()
{
    // ...

    Application.DocumentManager.Open(filePath, false);
    var x = "hello world"; // Never happens when debugging!

    // ...
}

 

Does anybody know how I can fix this issue?

 

Thanks!

0 Likes
448 Views
0 Replies
Replies (0)