Using Dropdowns in a Plugin

Elias_Malak
Explorer

Using Dropdowns in a Plugin

Elias_Malak
Explorer
Explorer

Hello,

 

I am working on a plugin that involves creating a dropdown menu with a list of file names. The main objective is to enable users to select an item from the dropdown and then proceed by clicking the "Ok" button, just like a ui.selectEntity box.

While exploring the available documentation, I have come across several dropdown examples. However, it appears that each of them necessitates an event handler to facilitate the plugin's response when a specific item from the list is chosen. I am hoping to find a simpler way of implementing this.

I would appreciate any guidance or assistance you can provide to implement this functionality.

 

Thanks in advance!

0 Likes
Reply
230 Views
1 Reply
Reply (1)

Jorge_Jaramillo
Collaborator
Collaborator

Hi,

 

Only one command execute handler is defined to handle the OK action of a command, and you will have access to all command inputs defined on it.

Optionally you have other events to be fired w

hile dealing with the command inputs inside the command, like: input changed, validate input, mouse click, and other.

The arguments passed to every handler give access to the current status of the command.

 

I'd recommend reading this article:

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051

 

Regards,

Jorge Jaramillo

 

1 Like