Thanks a lot for your work on this script, it's already saved my workflow immensely. I hacked a few things into it to get it to work for my use case and I wanted to pass them along in case they could be useful to someone else.
Just add the below into CommandEventHandler.notify.
# check box to force units
input = inputs.addDropDownCommandInput("units",
"Post Units",
adsk.core.DropDownStyles.TextListDropDownStyle)
input.listItems.add('Document Unit', True if docSettings["units"] == 0 else False, '')
input.listItems.add('Inches', True if docSettings["units"] == 1 else False, '')
input.listItems.add('Millimeters', True if docSettings["units"] == 2 else False, '')
Then add the following into the if/elif with the other input.id checks in CommandInputChangedHandler.notify.
Thanks a lot for your work on this script, it's already saved my workflow immensely. I hacked a few things into it to get it to work for my use case and I wanted to pass them along in case they could be useful to someone else.
Just add the below into CommandEventHandler.notify.
Then add the following into the if/elif with the other input.id checks in CommandInputChangedHandler.notify.