Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add-in Backward Compatibility

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
InvElm
465 Views, 9 Replies

Add-in Backward Compatibility

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. 

9 REPLIES 9
Message 2 of 10
Frederick_Law
in reply to: InvElm

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.

Message 3 of 10
bradeneuropeArthur
in reply to: InvElm

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 !

Message 4 of 10
InvElm
in reply to: Frederick_Law

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.

Message 5 of 10
Frederick_Law
in reply to: InvElm

"been unable to load it "

Did it crash when it load?

Was it "Block" ?

AddinBlock-01.jpg

Message 6 of 10
Frederick_Law
in reply to: InvElm

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

Message 7 of 10
InvElm
in reply to: Frederick_Law

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

Message 8 of 10
JelteDeJong
in reply to: InvElm

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

Message 9 of 10
Frederick_Law
in reply to: InvElm

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.

Tags (3)
Message 10 of 10
bradeneuropeArthur
in reply to: InvElm

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 !

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report