Coordinate > Clash Reports
Clash Dashboard
Builds a one-page HTML dashboard of the chosen clash tests (status, where the open clashes are, who holds them and for how long, groups and every clash) and opens it in your browser.
Status
Untested Never executed inside Navisworks. Passed the headless checks only.
Related asks to confirm
No quote is on record yet. These threads look related, but a person still has to open and read them.
Events it listens to
None. It runs only when you click it.
Files
Paths are relative to the Playground.extension folder.
Coordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/bundle.yamlCoordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/icon.dark.pngCoordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/icon.pngCoordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/icon.small.dark.pngCoordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/icon.small.pngCoordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Clash Dashboard, 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. Clash Dashboard is on the Coordinate tab, Clash Reports 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.
Coordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/script.py View on GitHub# -*- coding: utf-8 -*-
"""Builds a one-page HTML clash dashboard of the chosen tests and opens it in the default browser."""
from pynavis import script, toast
from namo import clashrep_forms as cf
from namo import clashreport as cr
from namo import rep_clash_html as rep
from namo import ui
TITLE = 'Clash Dashboard'
DEFAULTS = {'tests': [], 'statuses': list(cr.OPEN), 'images': True}
def run():
values = script.get_config(DEFAULTS)
if cf.runner_active():
cf.run_saved('clash_html', values)
return
doc = cr.active_doc()
problem = cf.start(doc)
if problem:
toast.show(*problem)
return
tests = cf.pick_tests(TITLE, 'Tick the tests for the dashboard.', values['tests'], doc)
if tests is None:
return
if not tests:
toast.info('No clash results yet', 'Run your clash tests in Clash Detective first.')
return
path = cr.default_path(rep.NAME_TEMPLATE, 'html', doc)
answers = ui.form(TITLE, cf.dashboard_fields(values, path), ok='Create', validate=cf.need_status, width=520)
if answers is None:
return
cap = cr.IMAGE_CAP
if answers['images']:
cap = cf.ask_images(TITLE, tests, answers['statuses'])
if cap is None:
return
values.update({'tests': cf.test_paths(tests), 'statuses': answers['statuses'], 'images': answers['images']})
script.save_config(values)
config = {'tests': values['tests'], 'statuses': answers['statuses'],
'images': bool(answers['images']) and cap != -1, 'image_cap': max(0, cap), 'path': answers['path']}
result = cf.run_report('clash_html', config, TITLE, doc)
if result is None:
return
toast.show(result['level'], result['message'], result['detail'])
if result['paths'] and result['level'] in ('success', 'warning'):
try:
ui.open_path(result['paths'][0])
except Exception:
toast.warning('Could not open the dashboard', 'Open it from %s.' % result['paths'][0])
run()
Library modules this tool uses
From the shared namo library, which installs with every tool. Each name opens the module on GitHub.
namo.clashrep_formsThe questions the Clash Reports buttons ask, in one place.namo.clashreportClash reports: the row shaping, summaries and tallies every Clash Reports tool shares.namo.rep_clash_htmlClash Dashboard: one standalone HTML page (namo.htmlreport) for the chosen clash tests.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.
Coordinate.tab/Clash_Reports.panel/Clash_Dashboard.pushbutton/bundle.yaml View on GitHubtitle: Clash\nDashboard
tooltip: Builds a one-page HTML dashboard of the chosen clash tests (status, where the open clashes are, who holds them and for how long, groups and every clash) and opens it in your browser.
context: clash-tests