Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 


Message 1 of 4
164 Views, 3 Replies


In my code I have this in my UI create method: command.isOKButtonVisible = False

This works because when the UI is created, the OK button is not visible.

Later in the code when the user has selected everything he/she is supposed to, I have: command.isOKButtonVisible = True

This however does not work.

I have checked to make sure it is run during debugging.

What am I missing?

Brad Bylls
Message 2 of 4
in reply to: brad.bylls

Hi @brad.bylls .


Perhaps the isOKButtonVisible property only works on the commandCreated event.

It would be easier for the user to understand if the OK button is grayed out until the conditions for executing the command are met, and then the OK button can be pressed when the conditions are met.

The state of the OK button can be changed using the validateInputs event and the areInputsValid property. 

Message 3 of 4
in reply to: kandennti

It is a matter of taste if the OK button is greyed out or not visible at all.

If I can change the visibility to False, it should also change to true the same way.

It seems that using the validatInputs event is a lot more unnecessary code if the OKButtonIsvisible would work.

And for my situation that would be just fine.

I will however explore your suggestion.

Thank you. 

Brad Bylls
Message 4 of 4
in reply to: brad.bylls

I would expect the same behavior as you about making the OK button visible, but I'm also not too surprised that it's not working.  The original use was to hide it for the dialog completely, so there was never a reason to make it visible again, and this workflow was likely never tested.  All of the built-in Fusion commands behave as Kandennti described, which is to show the OK button but have it disabled until the user has provided valid input.

Brian Ekins
Inventor and Fusion 360 API Expert

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

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report