Model > Select
Color Picked
Colors the picked items from light to strong blue along the pick order. One undo step.
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/Color_Picked.pushbutton/bundle.yamlModel.tab/Select.panel/Pick_Order_Actions.pulldown/Color_Picked.pushbutton/icon.dark.pngModel.tab/Select.panel/Pick_Order_Actions.pulldown/Color_Picked.pushbutton/icon.pngModel.tab/Select.panel/Pick_Order_Actions.pulldown/Color_Picked.pushbutton/icon.small.dark.pngModel.tab/Select.panel/Pick_Order_Actions.pulldown/Color_Picked.pushbutton/icon.small.pngModel.tab/Select.panel/Pick_Order_Actions.pulldown/Color_Picked.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Color Picked, tick it and click Install.
- The whole extension. Download
Playground.extension.zip, unzip it, put thePlayground.extensionfolder in%APPDATA%\pyNavis\extensions\, and click pyNavis > Reload. Color 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.
ReportSource
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/Color_Picked.pushbutton/script.py View on GitHub# -*- coding: utf-8 -*-
"""Colors the picked items from light to strong blue along the pick order."""
from pynavis import toast
from namo import sel_pickorder
picks = sel_pickorder.load()
if not picks:
toast.info('No picked items', 'Turn on Pick Order and click items in order first.')
else:
found, missing = sel_pickorder.resolve()
if not found:
toast.warning('None of the picked items are in the model',
'They may have been removed or re-exported. Clear Picked starts a new list.')
else:
sel_pickorder.color(found)
detail = 'Light blue is the first pick, strong blue the last. Ctrl+Z undoes it.'
if missing:
detail += ' %d picked items are no longer in the model.' % missing
toast.success('Colored %d %s in pick order' % (len(found), 'item' if len(found) == 1 else 'items'),
detail)
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/Color_Picked.pushbutton/bundle.yaml View on GitHubtitle: Color Picked
tooltip: Colors the picked items from light to strong blue along the pick order. One undo step.
context: doc