Inventor Customization

Reply
Employee
yuhanzhang
Posts: 411
Registered: ‎01-06-2009
Message 11 of 19 (1,029 Views)

Re: Debugging 2012 addin with VS2010

07-26-2011 12:32 AM in reply to: VidarDK

Can you share more info that which step you encounterred this error. Did you debug into the breakpoint?



Rocky Zhang
Inventor API
Manufacturing Solutions
Autodesk, Inc.

Contributor
VidarDK
Posts: 11
Registered: ‎08-14-2007
Message 12 of 19 (1,022 Views)

Re: Debugging 2012 addin with VS2010

07-26-2011 02:23 AM in reply to: yuhanzhang

If i debug your code it goes into the breakpoint, but when i step to linie 66 i get the error below (I'm running a 64-bit windows XP and VS2010 SP1).

No Source Avaiable

Call stack location:
msvcm90.dll!<CrtImplementationDetails>DoDllLanguageSupportValidation() Line505

Source file information:
Locating source for 'f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h'. Checksum: MD5 {35 fe 78 dc 38 4e b df 99 82 ab 9 9a ba 9d 2f}
The file 'f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h' does not exist.
Looking in script documents for 'f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h'...
Looking in the projects for 'f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Source was found at 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\minternal.h'.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
Determining whether the checksum matches for the following locations:
1: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\minternal.h Checksum: MD5 {c9 db 5a 4a a1 c7 49 7b 27 a6 a7 b4 4b e7 a d} Checksum doesn't match.
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h.
The debugger could not locate the source file 'f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h'.

 

When i insert addtional code eg. a simpel MsgBox and try to debug i still get the error: “DisconnectedContext was detected” 

    Public Sub m_featureCountButtonDef_OnExecute(ByVal Context As Inventor.NameValueMap) Handles m_featureCountButtonDef.OnExecute
      MsgBox("Hello", MsgBoxStyle.Information)
    End Sub

 




 



Contributor
sellis
Posts: 25
Registered: ‎10-21-2008
Message 13 of 19 (1,013 Views)

Re: Debugging 2012 addin with VS2010

07-26-2011 04:57 AM in reply to: yuhanzhang

Been busy so just getting back to this... 

 

64-bit win7 and VS2010

Tried out the posted addin sample. Can step through Activate and Inventor finishes loading. When I move the mouse over Inventor I get -



DisconnectedContext was detected
Message: Context 0x3ac0f8' is disconnected.  Releasing the interfaces from the current context (context 0x3abd80).This may cause corruption or data loss. To avoid this problem, please ensure that all contexts/apartments stay alive until the applicationis completely done with the RuntimeCallableWrappers that represent COM components that liveinside them.

 

Stan

Contributor
VidarDK
Posts: 11
Registered: ‎08-14-2007
Message 14 of 19 (1,003 Views)

Re: Debugging 2012 addin with VS2010

07-26-2011 06:42 AM in reply to: sellis

I have found a solution to the problem.
In VS2010 under Debug, Exceptions ...
remove checkmark from ContextSwitchDeadlock and DisconnectedContext.

Image.jpg

Contributor
sellis
Posts: 25
Registered: ‎10-21-2008
Message 15 of 19 (989 Views)

Re: Debugging 2012 addin with VS2010

07-26-2011 10:43 AM in reply to: VidarDK

This worked on the sample addin but...

 

When I tried debugging a very complex project "Visual Studio Remote Debugging Monitor" runs one CPU at 100% as soon I open a drawing. This project runs fine when not debugging.

 

Stan

Distinguished Contributor
ADNpati
Posts: 125
Registered: ‎07-01-2012
Message 16 of 19 (421 Views)

Re: Debugging 2012 addin with VS2010

01-30-2013 08:23 PM in reply to: yuhanzhang

HEllo Rocky

 

 

I Got everythig  correct, but I can't find .addin file in my project folder...

 

can you please point out me in corrct way.. please:smileysad:  :smileysad:   :smileysad:  :smileysad:

Mechanical Engineer
Inventor Applications Engineer

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, Some KUDOS -

-------------------------------------------------------------------------------------
Employee
yuhanzhang
Posts: 411
Registered: ‎01-06-2009
Message 17 of 19 (410 Views)

Re: Debugging 2012 addin with VS2010

01-31-2013 09:04 PM in reply to: ADNpati

When you use InventorWizards to create your addin project, you can find the .addin file in the project folder. Can you share more info about your situation? Like which Inventor you use, and in which language you create  your addin, and the VS version.



Rocky Zhang
Inventor API
Manufacturing Solutions
Autodesk, Inc.

Distinguished Contributor
ADNpati
Posts: 125
Registered: ‎07-01-2012
Message 18 of 19 (407 Views)

Re: Debugging 2012 addin with VS2010

01-31-2013 09:17 PM in reply to: yuhanzhang

Hello Rocky,

 

Thanks Mate for replies.

 

I found a way tofix the above issue with your post and updated in this thread.

i Got 2 Main questions in my head

 

1.   But I see there are two types of templates to use for VS2010. one is Autodesk Inventor AddIn (old Template) and Autodesk Inventor 2013 AddIn (updated).

     I am Using Autodesk FDS 2013 Premium and VS2010 Express with SP1 and with Windows SDK for .Net 4.

     There are .maifest errors when I use updated templates and no errors with old templates.

    Why is That?????????

 


2.   when I am debugging a simple module, VS2010 is opening Inventor and after i opening an assembly it is doing nothing.    Is there something that I am missing??? (fixed debug procedire foro express versions)

 

3.   How to get addin Button on to Auodesk Invedntor User interface??? so to use directly from Inventor

 

Thanks in Advace ffor your unlimited patience.

will wait on repply.

 

cheers.

Mechanical Engineer
Inventor Applications Engineer

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, Some KUDOS -

-------------------------------------------------------------------------------------
Employee
yuhanzhang
Posts: 411
Registered: ‎01-06-2009
Message 19 of 19 (393 Views)

Re: Debugging 2012 addin with VS2010

02-03-2013 11:03 PM in reply to: ADNpati

My answer are as below:

 

1. From Inventor 2013 we merged the InventorWizards installer to DeveloperTool.msi, and make sure we can install the DeveloperTools side by side with previous ones, so you can see the different versions of Inventor wizards templates, and the updated wizards template will have the latest Autodesk.Inventor.Interop.dll referenced if the VS supports(like VS2010 supports Inventor 2003).

 

As for the error, can you copy the error info here?

 

2. If I understand right, you mean you used the VS2010 to launch Inventor during debuged it, and then it did run into the code when you open an assembly document? Can you double check that you have the .addin file copied to proper folder, and set the Dll path in the .addin correctly? You can get help from the Readme.txt file in the addin project to know where to copy the .addin.

 

3. You can create your own controls on Ribbon in the addin project, you can find sample in SDK (like SimpleAddin : C:\Users\Public\Documents\Autodesk\Inventor 2013\SDK\DeveloperTools\Samples\VB.NET\AddIns\SimpleAddIn) with the source code.



Rocky Zhang
Inventor API
Manufacturing Solutions
Autodesk, Inc.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube