Adding and removing a TabCommandInput on the fly

Adding and removing a TabCommandInput on the fly

nraynaud
Enthusiast Enthusiast
602 Views
1 Reply
Message 1 of 2

Adding and removing a TabCommandInput on the fly

nraynaud
Enthusiast
Enthusiast

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.

0 Likes
603 Views
1 Reply
Reply (1)
Message 2 of 2

nraynaud
Enthusiast
Enthusiast
0 Likes