Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Community,
An external iLogic rule that worked in Inventor 2022 is not working in Inventor 2025.
The error:
The type initializer for 'DocumentExtensions' threw an exception.
Captured from Visual Studio debug mode
I have attached the IAM and Vb code in a Zip file.
Be certain to edit the 'AddVbFile' line to match where you save the external rule (Vb) file.
I have tried:
Dim doc As AssemblyDocument = ThisApplication.ActiveDocument
and
Dim doc As Inventor.AssemblyDocument = ThisApplication.ActiveDocument
It is likely to be an 'Import' or 'AddReference' that I am missing, but I have been unsuccessful at finding a solution.
I hope the community can help.
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
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
Solved! Go to Solution.