Model > Data

Clear Labels

Removes the value labels Property Labels drew in the view.

Tab and panelModel > Data
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

Clear Labels 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.

  • Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/bundle.yaml
  • Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.dark.png
  • Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.png
  • Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.small.dark.png
  • Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.small.png
  • Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/script.py

Install

  1. Only this tool. In Navisworks, click pyNavis > Playground, search for Clear Labels, 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. Clear Labels is on the Model tab, Data 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.

Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/script.py View on GitHub
# -*- coding: utf-8 -*-
"""Removes the labels Property Labels drew in the view."""
from pynavis import toast

from namo import data_labels


def run():
    removed = data_labels.clear()
    if not removed:
        toast.info('No labels to clear', 'Property Labels draws them.')
        return
    toast.success('Cleared %s %s' % ('{:,}'.format(removed), 'label' if removed == 1 else 'labels'))


run()

Library modules this tool uses

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

  • namo.data_labelsProperty Labels: a property's value drawn above each selected object in the 3D view through pynavis.overlay, with a short leader from the object's top-centre.

bundle.yaml

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

Model.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/bundle.yaml View on GitHub
title: Clear Labels
tooltip: Removes the value labels Property Labels drew in the view.