- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to clear the activeSelections, but if they are selected using userInterface.selectEntity, they will not be cleared.
import adsk.core, adsk.fusion, traceback
_app = adsk.core.Application.cast(None)
_ui = adsk.core.UserInterface.cast(None)
def run(context):
try:
global _app, _ui
_app = adsk.core.Application.get()
_ui = _app.userInterface
msg :str = 'select SolidBody'
selFiltter :str = 'SolidBodies'
_ui.selectEntity(msg, selFiltter)
actSels = _ui.activeSelections
_ui.messageBox('Before clearing count : {}'.format(actSels.count))
actSels.clear()
_ui.messageBox('After clearing count : {}'.format(actSels.count))
except:
if _ui:
_ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
As far as I remember, I was able to clear it.
I'm using Fusion360 Ver 2.0.8749.
Solved! Go to Solution.