Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on a script that starts with a user button group in the UI:
# Define the command dialog.
radioButtonGroup = inputs.addRadioButtonGroupCommandInput('radioButtonGroup', 'Support Plate?')
radioButtonItems = radioButtonGroup.listItems
radioButtonItems.add("Yes", False)
radioButtonItems.add("No", False)
When the user makes a selection 'Yes' or 'No'
I have this in the inputChanged method :
if changed_input.id == 'radioButtonGroup':
strResult = inputs.itemById('radioButtonGroup').selectedItem.name
if strResult == "Yes":
inputs.addImageCommandInput('baseImage', '', 'commands/resources/command_icons/MBA/MBA.png')
else:
inputs.addImageCommandInput('baseImage', '', 'commands/resources/command_icons/MBB/MBB.png')
Nothing changes in the UI.
I saw something about adding adsk.doEvents() right after inputs.addImage CommandInput() statements, but that also did nothing.
I am sure I am missing something but can't find what it might be.
Brad Bylls
Solved! Go to Solution.