Dev > Build

Script Editor

Edits the scripts of your own extensions beside Navisworks, with line numbers, completion, a syntax check on save and F5 to run.

Tab and panelDev > Build
KindButton

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/Build.panel/Script_Editor.pushbutton/bundle.yaml
  • Dev.tab/Build.panel/Script_Editor.pushbutton/icon.dark.png
  • Dev.tab/Build.panel/Script_Editor.pushbutton/icon.png
  • Dev.tab/Build.panel/Script_Editor.pushbutton/icon.small.dark.png
  • Dev.tab/Build.panel/Script_Editor.pushbutton/icon.small.png
  • Dev.tab/Build.panel/Script_Editor.pushbutton/script.py

Install

  1. Only this tool. In Navisworks, click pyNavis > Playground, search for Script Editor, 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. Script Editor is on the Dev tab, Build 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/Build.panel/Script_Editor.pushbutton/script.py View on GitHub
# -*- coding: utf-8 -*-
"""Opens the Script Editor on the bundles of your own extensions."""
from pynavis import toast

from namo import editor

if globals().get('__runner__'):
    toast.info('The Script Editor needs the Navisworks window', 'It cannot open under pynavis run.')
else:
    editor.show()

Library modules this tool uses

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

  • namo.editorScript Editor: a code editor beside Navisworks for the bundles you can change.

bundle.yaml

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

Dev.tab/Build.panel/Script_Editor.pushbutton/bundle.yaml View on GitHub
title: Script\nEditor
tooltip: Edits the scripts of your own extensions beside Navisworks, with line numbers, completion, a syntax check on save and F5 to run.