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: 

Create two input windows

Message 1 of 4
336 Views, 3 Replies

Create two input windows

I am try to create two input windows. 

The first is a drop-down input.

The user makes a selection and the window closes and another input window opens with information populated with information based on the user's input from the first window.

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

Hi @brad.bylls 


You can create two CommandDefinitions, one to get the user selection and one for showing the information.

On execution of your first command you can call the execute method of your second CommandDefinition using CommandDefinition.execute method.


If you prefer to not allow the user to run your second command directly, you simply should not add it to any toolbar or menu. Just create a CommandDefinition using CommandDefinitions.addButtonDefinition method.


I think the simplest way to pass information between the two commands is creating add-ins instead of scripts. Add-ins stay active, so you can share the information between its commands.

Also usign UserInterface.commandDefinitions you can get the list of all commandDefinitions and get any commandDefinition using CommandDefinitions.itemById method.

Message 3 of 4
in reply to: brad.bylls

I also suggest you think about using one window instead of two. Perhaps it will be feasible in your case. In many cases it will be enough to have just one window and control what is visible in it using isVisible property of different CommandInput objects (especially GroupCommandInput and TabCommandInput objects)

Message 4 of 4
in reply to: nnikbin

There is no button to mark as solved.

I tried on Chrome and Edge.

Thanks for the help.

Brad Bylls

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