Community
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.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding and removing a TabCommandInput on the fly

1 REPLY 1
Reply
Message 1 of 2
nraynaud
374 Views, 1 Reply

Adding and removing a TabCommandInput on the fly

I am trying to change the UI in reaction to some input change, but it looks like nothing is reacting.

here is a test (using Fusion360AddinSkeleton):

class TestTabCommand(Fusion360CommandBase):
def on_input_changed(self, command: Command, inputs: CommandInputs, changed_input, input_values):
if changed_input.id == 'test':
AppObjects().ui.messageBox('adding tab')
self.inputs.addTabCommandInput('general_tab', 'New Tab', '')

def on_create(self, command: Command, inputs: CommandInputs):
self.inputs = inputs
general_tab = inputs.addTabCommandInput('general_tab', 'General', '')
general_tab.children.addBoolValueInput('test', 'test', False)

 When clicking on the 'test' button, the messageBox shows, but no new tab appears.

 

Is there a way to customize the UI on the fly?

 

Thanks for your help,

Nicolas.

1 REPLY 1
Message 2 of 2
nraynaud
in reply to: nraynaud

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