Refer the below link
This might Help you out
Hey, thanks for the reply but I've done this process and now instead I get this exception both Inventor as my addin crash. Again, it just rushes sometimes for no apparent reason.
I got the same LoaderLock message when i was trying to open a PartDocument. That Solution worked for me.
Can you try using Document Object to open rather than DrawingDocument. That is not a problem, but you can simply try that out.
I did what do you proposed and now I received the following exception:
ContextSwitchDeadlock occurred
Message: Managed Debugging Assistant 'ContextSwitchDeadlock' has detected a problem in 'C:\Program Files\Autodesk\Inventor 2014\Bin\Inventor.exe'.
This is the code to open de document:
Document oDocumento = inventorAPP.Documents.Open(path, false);
Now without the Loader Lock detection in the Visual Studio I have three scenarios:
1 - The addin works correctly;
2 - The addin freezes (with the Inventor) in this line of code;
3 - The addin return the exception "ContextSwitchDeadlock occurred".
In the code, I try to open several files, but this exception always occur when I try to open the first drawing document in my list.
I never seen those exceptions before.
Any ideas ?
Hi,
I am out of ideas....
I am also trying to reproduce the issue, but unable to do so.
Did u check your call stack ?
Check the below link
http://forums.autodesk.com/t5/Inventor-Customization/Debugging-2012-addin-with-VS2010/td-p/3065260
I am not sure whether this will help you out...!