Add-in Backward Compatibility

InvElm
Participant
Participant

Add-in Backward Compatibility

InvElm
Participant
Participant

I spun my wheels for a bit trying to run an old Add-in within Inventor 2024, and thought maybe someone else out there tackled a similar issue.

 

We have an Add-in that was coded inhouse using VS2008 VB.net back in the day, but we have been unable to load it after upgrading to Inventor 2015 and now to 2024.

 

Are there any resources out there that discuss porting Add-ins between different Inventor versions?

 

I tried to de-bug the code in VS2008, but when it attempted to run Inventor when stepping-in, I got the following message "The debugger's protocol is incompatible with the debugee" I think that happens because the code is written in an obsolete .Net 3.5.

 

Maybe someone ran into a similar issue with legacy Add-ins. Thank you in advance. 

0 Likes
Reply
Accepted solutions (3)
590 Views
9 Replies
Replies (9)

Frederick_Law
Mentor
Mentor
Accepted solution

Can you load the code and rebuild? 

I have IV2017 addin still running with IV2023. .Net 4.7.1

Some API call were changed.

IV2012 changed material and appearance.

I need to change a few addin in 2017 due to Microsoft changed Garbage Collection.

 

Usually I'll rebuild with updated .Net and IV version.

Using VS2022 Community now.

0 Likes

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Could you share the dll file and the add-in file, or the project files(vb.net)?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes

InvElm
Participant
Participant

I really appreciate your help.

 

I tried changing the target framework in VS2022, but it didn't work. I got VS2012, thinking that it's closer to VS2008, and managed to change the target framework to 4.0. But I am getting an error with mscorlib as shown in the snapshot below.

 

I tried to put the project on my desktop, to avoid the issue with long path files

https://itecnote.com/tecnote/c-could-not-resolve-mscorlib-for-target-framework-netframeworkversionv4... 

 

I have to be quite frank with you, I have limited knowledge of Add-ins in Inventor. But, I managed to get the VBA scripts to work by removing obsolete calls, and working around the 32-bit issues.

0 Likes

Frederick_Law
Mentor
Mentor

"been unable to load it "

Did it crash when it load?

Was it "Block" ?

AddinBlock-01.jpg

0 Likes

Frederick_Law
Mentor
Mentor

I don't think you should target 4.0:

AddinTarget-01.jpg

 

Also check "Autodesk.Inventor.Interop", mine can go back to IV2013, I think:

AddinTarget-02.jpg

0 Likes

InvElm
Participant
Participant

Thank you so much for your suggestions, it's appreciated.

0 Likes

JelteDeJong
Mentor
Mentor

An add-in that old could also be a "Registry-based Add-in". You might check this:

https://adndevblog.typepad.com/manufacturing/2021/04/retire-registry-based-add-ins-in-inventor-2022....

 

I'm not sure about this but I expect you need .Net framework 4.8 and a 64bit. (look at the System requirements for Autodesk Inventor 2024)

 

I wrote a blog/tutorial article "Help: My addin won't load". Maybe it's useful...

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Frederick_Law
Mentor
Mentor

Post your Inventor.addin file.

It looks like this:

 

<Addin Type="Standard">
  <!--Created for Autodesk Inventor Version 27.0-->
  <ClassId>{e5a316d1-8f45-48d9-94b2-339b7b927c48}</ClassId>
  <ClientId>{e5a316d1-8f45-48d9-94b2-339b7b927c48}</ClientId>
  <DisplayName>IV_CS_Net_AddIn_Ribbon1</DisplayName>
  <Description>IV_CS_Net_AddIn_Ribbon1</Description>
  <Assembly>IV_CS_Net_AddIn_Ribbon1.dll</Assembly>
  <!--LoadOnStartUp 1 LoadOnStartUp-->
  <LoadAutomatically>1</LoadAutomatically>

  <!--LoadBehavior  0:Start with Inventor -->
  <!--LoadBehavior  1:Start with part -->
  <!--LoadBehavior  2:Start with assembly -->
  <!--LoadBehavior  3:Start with presentation -->
  <!--LoadBehavior  4:Start with drawing -->
  <!--LoadBehavior 10:On Demand -->

  <LoadBehavior>1</LoadBehavior>
  <UserUnloadable>1</UserUnloadable>
  <Hidden>0</Hidden>
  <SupportedSoftwareVersionGreaterThan>26..</SupportedSoftwareVersionGreaterThan>
  <DataVersion>1</DataVersion>
  <UserInterfaceVersion>1</UserInterfaceVersion>
</Addin>

 

It might has a <SupportedSoftwareVersionLessThan> which will prevent it from loading in newer IV.

 

If you can zip your VS Project and attach it, we can check it.

0 Likes

bradeneuropeArthur
Mentor
Mentor
Accepted solution

I have solved it by creating a new add-in files using the original ones something similar like described in the help file of Inventor Programming Help: 

"Converting an Existing Add-In to be Registry-Free"

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes