I used RadioButtonGroupCommandInput to make mirror to my design , how I can active the mirror tool by the Radio Input ?

I used RadioButtonGroupCommandInput to make mirror to my design , how I can active the mirror tool by the Radio Input ?

mohammadkhader698
Participant Participant
370 Views
1 Reply
Message 1 of 2

I used RadioButtonGroupCommandInput to make mirror to my design , how I can active the mirror tool by the Radio Input ?

mohammadkhader698
Participant
Participant

I don't know how to take the input from the radiobutton and active the mirror tool

0 Likes
Accepted solutions (1)
371 Views
1 Reply
Reply (1)
Message 2 of 2

Jorge_Jaramillo
Collaborator
Collaborator
Accepted solution

Hi @mohammadkhader698 ,

 

In your notify()'s commandExecuteHandler you can get a reference to the RadioButtonGroupCommandInput and the look for its value, like so:

# MIRROR_RADIO_GRP is the name you gave to the RadioButtonCommandInput

# get a reference to the command input
mirrorCmd = adsk.core.RadioButtonGroupCommandInput.cast(eventArgs.command.commandInputs.itemById(MIRROR_RADIO_GRP))

# get the option selected by the user
if mirrorCmd.selectedItem.name == 'Mirror': # <--- name you gave to the listItem's Mirror option
    # Do actions related with MIRROR
else:
    # Do actions related with NO-MIRROR

 

Regards,

Jorge

0 Likes