As author of several Inventor Add-Ins I used to have several releases installed on my working PC simultaneously.
I initialize them (one-by-one) for check/debug my add-ins.
Recently I've discovered that UserInterfaceEvents.OnEnvironmentChange Event is not triggered in all Inventor releases installed except for newest.
Steps to reproduce (need to have installed at least two Inventor releases, I believe any releases):
1. Run newer Inventor (ex.2025)
2. Run Event Watcher 2025 (need to install DeveloperTools from Inventor-2025-SDK) and activate UserInterfaceEvents.OnEnvironmentChange
3. Switch to Inventor 2025 and open/activate Inventor document and witness Event Watcher logs each Environment change.
4. Close Event Watcher 2025 and Inventor 2025
Repeat steps 1-3 for some older Inventor, for example:
5. Run Inventor 2024
6. Run Event Watcher 2024 (need to install DeveloperTools from Inventor-2024-SDK) and activate UserInterfaceEvents.OnEnvironmentChange
7. Switch to Inventor 2024 and open/activate Inventor document and witness Event Watcher DON'T LOG any of Environment changes.
Thus Environment change dependent functionality of my add-ins doesn't work for the given Inventor release if newer Inventor is also installed.
I wonder if anybody could confirm reproducibility of the issue described?
I also would like @MjDeck and @johnsonshiue be aware of this thread.
Hi Maxim - the problem might be in the Event Watcher tool. Does the event work in your add-in?
Dear @MjDeck
The first place where the problem was reproduced was my addin and only then it was confirmed with Event Watcher.
And today I can't get the event trigger even in Inventor 2025.0.1.
Whether I supposed to do a reset or something alike?
I tested in Inventor 2024.3 and 2025.0.1 with the attached add-in, and the event works fine. Can you test with this add-in? It uses Trace.WriteLine to log info about the event. To see the output, attach a debugger or use DebugView.
As ZIP doesn't contain DLL I open in with Visual Studio (Community 2022) and get this dialog:
Is it OK to upgrade?
Yes, it should be OK to upgrate it to Framework 4.8. I will try it on Visual Studio 2022.
Edit: I tried it and it works fine.
Seems like your add-in behaves the same as Event Watcher.
The issue itself seems to be local (it is not reproducible on my auxiliary PC).
As to main PC - resetting a particular release sometimes help, but not each time.
I begin to think something is wrong with my Inventor or Windows profile.
Don't you know if it Restore-a-Corrupt-Inventor-User-Profile procedure is applicable for actual releases (it lists 2016-2019)?
Did you reboot the computer?
I was testing after I saw your post and I got the same problem. Event Handler didn't work at all.
I have another crashed IV running.
I don't see a problem with the OnEnvironmentChange event in either 2024 or 2025.
You might have to run a given version of Inventor once and then exit the process to make sure it's registered.
Here's a workflow:
Can't find what you're looking for? Ask the community or share your knowledge.