setSelectionLimits

setSelectionLimits

brad.bylls
Collaborator Collaborator
615 Views
5 Replies
Message 1 of 6

setSelectionLimits

brad.bylls
Collaborator
Collaborator

I have a add-in script that used to work a few months ago. (I have not used it since then)

The script creates a dialog box for selection input.

I have set both _inputSelectTargets and _inputSelectTools to allow multiple selections. setSelectionLimits(0)

However, each one now only allows for 1 selection.

# Create the command dialog
_inputSelectTargets = inputs.addSelectionInput('target', 'Target Bodies', 'Select the Bodies\nThat Will Be Cut')
_inputSelectTargets.addSelectionFilter(adsk.core.SelectionCommandInput.Bodies)
_inputSelectTargets.setSelectionLimits(0)
_inputSelectTools = inputs.addSelectionInput('tool', 'Tool Bodies', 'Select the Bodies\nThat Will Do The Cutting')
_inputSelectTools.addSelectionFilter(adsk.core.SelectionCommandInput.Bodies)
_inputSelectTools.setSelectionLimits(0)
_inputHideTools = inputs.addBoolValueInput('hideTools', 'Keep Tool Bodies?', True)
_inputErrMessage = inputs.addTextBoxCommandInput('errMessage', '', '', 2, True)
_inputErrMessage.isFullWidth = True

 

Brad Bylls
0 Likes
Accepted solutions (2)
616 Views
5 Replies
Replies (5)
Message 2 of 6

kandennti
Mentor
Mentor
Accepted solution
0 Likes
Message 3 of 6

BrianEkins
Mentor
Mentor

This appears to be fixed in the latest update.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 4 of 6

brad.bylls
Collaborator
Collaborator

Brian,

My version is 2.0.14113 and it is not fixed.

I don't know if this is the latest version, if it is not, how do I get it?

 

Brad

Brad Bylls
0 Likes
Message 5 of 6

kandennti
Mentor
Mentor
Accepted solution

@brad.bylls .

 

The latest is V2.0.14337.

Under normal circumstances, if Fusion360 is running, LiveUpdate will function and update the software.

 

I have not used it, but if it does not work, the Service Utility may be able to fix it successfully.

https://knowledge.autodesk.com/support/fusion-360/troubleshooting/caas/sfdcarticles/sfdcarticles/Ove... 

0 Likes
Message 6 of 6

brad.bylls
Collaborator
Collaborator

@kandennti 

Thank you.

That worked.

Now the setSelectionLimits works properly.

 

Brad

Brad Bylls