Model > Select

Clear Picked

Empties the pick list of this model.

Tab and panelModel > Select
KindButton
Live whenA model is open

Status

Untested Never executed inside Navisworks. Passed the headless checks only.

The public ask

No public source is on record for this tool.

Events it listens to

None. It runs only when you click it.

Files

Paths are relative to the Playground.extension folder.

  • Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/bundle.yaml
  • Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/icon.dark.png
  • Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/icon.png
  • Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/icon.small.dark.png
  • Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/icon.small.png
  • Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/script.py

Install

  1. Only this tool. In Navisworks, click pyNavis > Playground, search for Clear Picked, tick it and click Install.
  2. The whole extension. Download Playground.extension.zip, unzip it, put the Playground.extension folder in %APPDATA%\pyNavis\extensions\, and click pyNavis > Reload. Clear Picked is on the Model tab, Select panel.

You need pyNavis 1.3.0 or later.

Tried it? Tell us whether it worked or not. That report is what moves a tool up the status ladder.

Report

Source

The tool's own files, word for word as published in pynavis/Playground. Paths are relative to the Playground.extension folder.

script.py

The script that runs on a click.

Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/script.py View on GitHub
# -*- coding: utf-8 -*-
"""Empties the pick list of this model."""
from pynavis import forms, toast

from namo import sel_pickorder

count = len(sel_pickorder.load())
if not count:
    toast.info('The pick list is already empty', 'Turn on Pick Order and click items to start one.')
elif count <= sel_pickorder.CONFIRM_CLEAR_OVER or forms.confirm(
        'Clear the pick list of %d items? This cannot be undone.' % count, 'Clear Picked'):
    sel_pickorder.clear()
    toast.success('Cleared %d picked %s' % (count, 'item' if count == 1 else 'items'))

Library modules this tool uses

From the shared namo library, which installs with every tool. Each name opens the module on GitHub.

  • namo.sel_pickorderPick Order: an ordered list of items the user clicks, and what to do with it.

bundle.yaml

The bundle contract: the keys pyNavis reads for this tool.

Model.tab/Select.panel/Pick_Order_Actions.pulldown/Clear_Picked.pushbutton/bundle.yaml View on GitHub
title: Clear Picked
tooltip: Empties the pick list of this model.
context: doc