Model > Data
Clear Labels
Removes the value labels Property Labels drew in the view.
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.yamlModel.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.dark.pngModel.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.pngModel.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.small.dark.pngModel.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/icon.small.pngModel.tab/Data.panel/Data_Tools.stack/Clear_Labels.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Clear Labels, tick it and click Install.
- The whole extension. Download
Playground.extension.zip, unzip it, put thePlayground.extensionfolder 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.
ReportSource
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 GitHubtitle: Clear Labels
tooltip: Removes the value labels Property Labels drew in the view.