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: 

Using custom graphics while command inputs are not valid

Message 1 of 3
165 Views, 2 Replies

Using custom graphics while command inputs are not valid

It seems that when ValidateInputsEventHandler determines that the inputs are not valid (using ValidateInputsEventArgs.areInputsValid Property), it not only disables the OK button, but also prevents the firing of ExecutePreview event handler. With that in mind, is there any method to use custom graphics when inputs are invalid and ExecutePreview event handler is disabled? For example use custom graphics to graphically show the user why inputs are not valid.


I thought instead of setting areInputsValid to false we can set Command.isOKButtonVisible to false to prevent execution of command, but it seems it is not possible to set isButtonVisible property outside CommandCreatedEventHandler.notify Method.

Labels (1)
Message 2 of 3
in reply to: nnikbin

I found that I can use custom graphics in other parts of the program like in ValidateInputsEventHandler, but they remain on screen and I should delete them when I do not need them. Is it a good practice or we should only use them in ExecutePreview event handler?

Message 3 of 3
in reply to: nnikbin

Hi @nnikbin .


I don't think there is any limit to where I can use it.

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