Coordinate > Clash Reports
Count Matrix
Counts open and new clashes trade against trade (or model against model) across the chosen tests, as heat tables in the output window and an optional workbook.
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.
Coordinate.tab/Clash_Reports.panel/Clash_Count_Matrix.pushbutton/bundle.yamlCoordinate.tab/Clash_Reports.panel/Clash_Count_Matrix.pushbutton/icon.dark.pngCoordinate.tab/Clash_Reports.panel/Clash_Count_Matrix.pushbutton/icon.pngCoordinate.tab/Clash_Reports.panel/Clash_Count_Matrix.pushbutton/icon.small.dark.pngCoordinate.tab/Clash_Reports.panel/Clash_Count_Matrix.pushbutton/icon.small.pngCoordinate.tab/Clash_Reports.panel/Clash_Count_Matrix.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Count Matrix, 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. Count Matrix 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_Count_Matrix.pushbutton/script.py View on GitHub# -*- coding: utf-8 -*-
"""Counts open and new clashes trade against trade (or model against model) across the chosen tests."""
from pynavis import script, toast
from namo import clashrep_forms as cf
from namo import clashreport as cr
from namo import rep_clash_matrix as rep
from namo import ui
TITLE = 'Clash Count Matrix'
DEFAULTS = {'tests': [], 'axis': 'trade', 'xlsx': False}
def run():
values = script.get_config(DEFAULTS)
if cf.runner_active():
cf.run_saved('clash_matrix', values)
return
doc = cr.active_doc()
problem = cf.start(doc)
if problem:
toast.show(*problem)
return
tests = cf.pick_tests(TITLE, 'Tick the tests to count.', 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, 'xlsx', doc)
answers = ui.form(TITLE, cf.matrix_fields(values, path), ok='Count', width=500)
if answers is None:
return
values.update({'tests': cf.test_paths(tests), 'axis': answers['axis'], 'xlsx': answers['xlsx']})
script.save_config(values)
config = {'tests': values['tests'], 'axis': answers['axis'], 'xlsx': answers['xlsx'],
'path': answers['path'] if answers['xlsx'] else ''}
result = cf.run_report('clash_matrix', config, TITLE, doc)
if result is None:
return
toast.show(result['level'], result['message'], result['detail'])
cf.reveal(result)
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_matrixClash Count Matrix: trade against trade (or model against model) counts of open and of new clashes across the chosen 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_Count_Matrix.pushbutton/bundle.yaml View on GitHubtitle: Count\nMatrix
tooltip: Counts open and new clashes trade against trade (or model against model) across the chosen tests, as heat tables in the output window and an optional workbook.
context: clash-tests