Multiple Inventor buttons greyed out because of my addin

Multiple Inventor buttons greyed out because of my addin

Jaapflonk1
Participant Participant
258 Views
6 Replies
Message 1 of 7

Multiple Inventor buttons greyed out because of my addin

Jaapflonk1
Participant
Participant

Multiple buttons like Stress Analysis and Dynamic Simulation are greyed out whenever my addin is loaded in.

 

Jaapflonk1_0-1751638222862.png

 

When i turn of my addin these buttons are not greyed out anymore.

 

My addin adds a bunch automatization tools to Inventor.

I do not do touch any of these greyed out buttons with my addin or do anything with their functionality.

 

Anybody have an idea what can cause this and how i can fix it?

0 Likes
Accepted solutions (1)
259 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

can you upload the code, otherwise it is hard to find out why!

 

When Stress Analysis and Dynamic Simulation are greyed out in Autodesk Inventor, it usually means the environment isn't fully enabled or something's blocking access. Here's a breakdown of what might be going on and how to fix it:
1. Check Add-Ins Are Loaded
- Go to Tools → Add-Ins
- Make sure Stress Analysis, Dynamic Simulation, and related environments are set to Loaded and Load Automatically
- If they’re already loaded and still greyed out, continue below
2. You're Not in the Right Environment
- These tools only work in Assembly or Part environments, depending on the feature
- For example, Stress Analysis requires a part or assembly file to be open and active
- If you're in a Presentation or Drawing file, the buttons will be disabled
3. Simulation Player Is Active
- If you’ve previously run a simulation, the Simulation Player might still be active
- Click Rewind or Return to Construction Mode in the Simulation Player to unlock editing tools

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
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:
My 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 !


 


EESignature

0 Likes
Message 3 of 7

Jaapflonk1
Participant
Participant

Sadly i can not share the code.

 

1. Addins are all loaded

2. I am in the right environment

3. Simulation player is not in use

 

As soon as i turn off my addin and restart Inventor all buttons work again.

 

0 Likes
Message 4 of 7

Jaapflonk1
Participant
Participant

I have solved the issue but i still don't really understand why this happens.

 

I added added this event in my AddinServer:

Inv.App.UserInterfaceManager.UserInterfaceEvents.OnEnvironmentChange += UserInterfaceEvents_OnEnvironmentChange;


private void UserInterfaceEvents_OnEnvironmentChange(Inventor.Environment Environment, EnvironmentStateEnum EnvironmentState, EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{


HandlingCode = HandlingCodeEnum.kEventHandled;
}

 

The event works, but it causes the Stress Analysis and the other buttons to be greyed out.

 

This seems like a bug to me.

 

0 Likes
Message 5 of 7

g.georgiades
Advocate
Advocate
Accepted solution

The simulation environments are actually addins in inventor. 

ggeorgiades_0-1752059262469.png

 

Many addins are using that event handler. Because you have

HandlingCode = HandlingCodeEnum.kEventHandled;

 I believe it is preventing the other event consumers from running. Try removing just that line and see if the buttons show up.

There is some context in the docs about handling codes https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=HandlingCodeEnum

In web terms, that line stops the event from propogating to other consumers.

 

Likely it means your addin is probably loading before the simulation addins.

Message 6 of 7

Jaapflonk1
Participant
Participant

That line seems to be mandatory. 

 

However changing it to kEventNotHandled does solve the problem.

 

Thanks!

0 Likes
Message 7 of 7

g.georgiades
Advocate
Advocate

I suppose some event handlers require the handling code to be set and some do not.

I know App Events usually do not require it.