Model > Select
Pick Order
Records the items you click, in the order you click them, so you can select, number, export or color them in that order. Click it, then click items one at a time (Ctrl+click works too); the bar along the bottom of the window counts them.
Status
Launched Ran inside Navisworks at least once with no error logged; nobody checked the result yet.
Ran headless under pynavis run against a sample model; no selection: ran to the end (wrote output); result not checked by a person.
The public ask
No public source is on record for this tool.
Events it listens to
It needs these Navisworks event hooks, so installing it also copies the shared hooks folder:
selection-changed
Files
Paths are relative to the Playground.extension folder.
Model.tab/Select.panel/Pick_Order.toggle/bundle.yamlModel.tab/Select.panel/Pick_Order.toggle/icon.dark.pngModel.tab/Select.panel/Pick_Order.toggle/icon.off.dark.pngModel.tab/Select.panel/Pick_Order.toggle/icon.off.pngModel.tab/Select.panel/Pick_Order.toggle/icon.on.dark.pngModel.tab/Select.panel/Pick_Order.toggle/icon.on.pngModel.tab/Select.panel/Pick_Order.toggle/icon.pngModel.tab/Select.panel/Pick_Order.toggle/icon.small.dark.pngModel.tab/Select.panel/Pick_Order.toggle/icon.small.pngModel.tab/Select.panel/Pick_Order.toggle/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Pick Order, 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. Pick Order 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.toggle/script.py View on GitHub# -*- coding: utf-8 -*-
"""Turns Pick Order on (record the items you click, in order) or off.
Whether picks are being recorded decides, not the button's own on/off state, so the two
can never disagree (the way the shipped Hide Tabs toggle works). While it is on, the
running count sits on the banner along the bottom of the window.
"""
from pynavis import forms, script, toast
from namo import sel_pickorder
def run():
if sel_pickorder.is_on():
count = sel_pickorder.stop()
script.set_toggle_state(False)
toast.info('Pick order off: %s picked' % '{:,}'.format(count),
'Use Picked to select, number, export or color them in order.' if count else
'No items were picked.')
return
picks = sel_pickorder.load()
if picks:
choice = forms.ask_options(
'This model already has a pick list of %s %s.' % (
'{:,}'.format(len(picks)), 'item' if len(picks) == 1 else 'items'),
['Continue the list', 'Start a new list'], title='Pick Order')
if choice is None:
script.set_toggle_state(False)
return # cancelled: say nothing
if choice == 'Start a new list':
sel_pickorder.clear()
shown = sel_pickorder.start() # puts the prompt on the banner
script.set_toggle_state(True)
if not shown:
toast.info(*sel_pickorder.status_text(len(sel_pickorder.load())))
run()
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.toggle/bundle.yaml View on GitHubtitle: Pick\nOrder
title_on: Stop\nPicking
tooltip: Records the items you click, in the order you click them, so you can select, number, export or color them in that order. Click it, then click items one at a time (Ctrl+click works too); the bar along the bottom of the window counts them.
tooltip_on: Stops recording picks. The pick list is kept for this model.
context: doc