pyNavis panel
Panel slots
Make more dock panel slots when the five that ship are all claimed.
On the ribbonButton in the flyout, pyNavis panel
NeedsNothing, and no administrator rights
What it does#
A dock panel bundle needs a slot in the loader to live in, and five ship with pyNavis. Each dock panel claims one for life. When a sixth panel arrives this tool generates a small satellite assembly holding more slots, up to 95 extra.
How to use it#
- Open the pyNavis panel's flyout (the small arrow on the panel title) and click Panel slots.
- It reports how many slots exist and asks how many extra you want.
- Restart Navisworks. The new slots exist only after that.
Limitations#
- Every slot is visible in
View > Windowsas "pyNavis Panel N", claimed or not. Asking for 95 puts 95 entries in that menu. - The satellite is written beside the loader in
%APPDATA%\Autodesk\ApplicationPlugins\pyNavis.bundle, so it is per user.
Good to know#
You will not need this unless you install extensions that bring their own dock panels. The two shipped panels use two of the five slots.
Source#
The tool's own files, word for word as shipped in pyNavis.panel/More.slideout/Panel_Slots.pushbutton. Every pyNavis tool is an ordinary bundle: copy these into your own extension and change what you like.
script.py Runs on a click. View on GitHub"""Adds pyNavis panel slots beyond the five that ship with the loader."""
from pynavis import forms, panes, toast
current = panes.slot_count()
extra = forms.ask_number(
'Panel slots available now: %d.\nHow many extra slots do you want?' % current,
default=5, min_value=0, max_value=95, title='Panel slots')
if extra is None:
pass # cancelled: stay silent
else:
try:
total = panes.add_slots(extra)
toast.success('Panel slots: %d after restart' % total,
'Restart Navisworks to register the new slots.')
except Exception as ex:
toast.error('Could not add panel slots', str(ex))bundle.yaml The bundle contract: the keys pyNavis reads for this tool. View on GitHubtitle: Panel\nslots
tooltip: Add more pyNavis panel slots