Dev > Team

Playground Settings

Sets your name, the project and company, where Playground keeps team data, the trades and trade rules, report units and the date format.

Tab and panelDev > Team
KindButton

Status

Untested Never executed inside Navisworks. Passed the headless checks only.

The public ask

No public source is on record for this tool.

Installs with

Playground Settings sits in a stack, so installing it also installs:

Events it listens to

None. It runs only when you click it.

Files

Paths are relative to the Playground.extension folder.

  • Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/bundle.yaml
  • Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/icon.dark.png
  • Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/icon.png
  • Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/icon.small.dark.png
  • Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/icon.small.png
  • Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/script.py

Install

  1. Only this tool. In Navisworks, click pyNavis > Playground, search for Playground Settings, 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. Playground Settings is on the Dev tab, Team 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/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/script.py View on GitHub
# -*- coding: utf-8 -*-
"""Edits the settings every Playground tool shares."""
from pynavis import toast

from namo import config, paths, team_settings, ui

if globals().get('__runner__'):
    toast.info('The settings window needs Navisworks', 'It cannot open under pynavis run.')
else:
    values = ui.form('Playground Settings', team_settings.fields(config.load()), ok='Save', width=560,
                     validate=lambda v: team_settings.validate(v))
    if values is not None:
        try:
            saved = config.save(team_settings.to_config(values))
        except (IOError, OSError) as error:
            toast.error('Could not save the settings', str(error))
        else:
            paths.forget_reachability()
            toast.success('Saved the Playground settings', team_settings.summary(saved))

Library modules this tool uses

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

  • namo.configPlayground-wide settings: one JSON file shared by every Playground tool.
  • namo.pathsWhere Playground keeps its files, and how it writes them safely.
  • namo.team_settingsPlayground Settings: the form over namo.config (user, project, company, where team data lives, trades and trade rules, report units, date format).
  • namo.uiWPF building blocks for Playground tools, themed from the pyNavis design system.

bundle.yaml

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

Dev.tab/Team.panel/Team_Tools.stack/Playground_Settings.pushbutton/bundle.yaml View on GitHub
title: Playground Settings
tooltip: Sets your name, the project and company, where Playground keeps team data, the trades and trade rules, report units and the date format.