Dev > Automate

Command Palette

Type a few letters to run any pyNavis or Navisworks command, go to a saved view or select a set. Recently used ones come first.

Tab and panelDev > Automate
KindButton
ShortcutCtrl+Shift+P

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.

  • Dev.tab/Automate.panel/Command_Palette.pushbutton/bundle.yaml
  • Dev.tab/Automate.panel/Command_Palette.pushbutton/icon.dark.png
  • Dev.tab/Automate.panel/Command_Palette.pushbutton/icon.png
  • Dev.tab/Automate.panel/Command_Palette.pushbutton/icon.small.dark.png
  • Dev.tab/Automate.panel/Command_Palette.pushbutton/icon.small.png
  • Dev.tab/Automate.panel/Command_Palette.pushbutton/script.py

Install

  1. Only this tool. In Navisworks, click pyNavis > Playground, search for Command Palette, 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. Command Palette is on the Dev tab, Automate 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.

Dev.tab/Automate.panel/Command_Palette.pushbutton/script.py View on GitHub
# -*- coding: utf-8 -*-
"""Finds any command, saved viewpoint or selection set by name and runs it."""
from pynavis import toast
from pynavis._api import Application

from namo import palette

if globals().get('__runner__'):
    toast.info('The Command Palette needs the Navisworks window', 'It cannot open under pynavis run.')
else:
    palette.open_palette(Application.ActiveDocument)

Library modules this tool uses

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

  • namo.paletteCommand Palette: type a few letters, press Enter, the command runs.

bundle.yaml

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

Dev.tab/Automate.panel/Command_Palette.pushbutton/bundle.yaml View on GitHub
title: Command\nPalette
tooltip: Type a few letters to run any pyNavis or Navisworks command, go to a saved view or select a set. Recently used ones come first.
shortcut: Ctrl+Shift+P