Difficulty adding resources to .NET8 type Inventor Addin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Curtis ( @Curtis_Waguespack ) / Community,
I am building a custom addin for Inventor 2025 and encountered difficulties adding button icon resources.
I used the 'Addin Basic Template' from your AU Class:
Bridging the Gap Between iLogic Automation and Inventor Add-Ins
I updated the project for Inventor 2025, .NET8 compatibility.
Your add-in was working for the ZeroDoc, Assembly, and Drawing Environments.
Next, I copied the Detect_Dark_Light_Theme.vb code to create my custom button. Also copied necessary code in StandardAddInServer.vb to add my custom button. I added my button icons (PNGs) to the Resources folder. I updated the copied VB code to reference my custom button icons.
However, when starting Inventor (loading the addin), this error appears related to the line in PictureConverter:
Me.hbitmap = bitmap.GetHbitmap()
'Object reference not set to an instance of an object.'
When I referenced your icons for my buttons, the addin worked without errors.
I discovered I had to manually edit the Resouces.resx file to add my custom icons to the project/assembly.
The addin works now with my custom button and icon.
Have you or others encountered this resource difficulty for .NET8 type Inventor addins?
Thank you for your time and attention. I look forward to your reply.
Regards,
Jerry
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional