Coordinate > Clash Reports
Clash Delta
Compares the chosen clash tests now with a snapshot: new, fixed and still open clashes and status changes, in the output window and an optional workbook.
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.
- https://forums.autodesk.com/t5/navisworks-forum/navisworks-clash-detective-status-reports/td-p/5563947
- https://forums.autodesk.com/t5/navisworks-forum/clash-reports-how-are-you-handling-them/td-p/2974394
Installs with
Clash Delta 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.
Coordinate.tab/Clash_Reports.panel/History.stack/Clash_Delta.pushbutton/bundle.yamlCoordinate.tab/Clash_Reports.panel/History.stack/Clash_Delta.pushbutton/icon.dark.pngCoordinate.tab/Clash_Reports.panel/History.stack/Clash_Delta.pushbutton/icon.pngCoordinate.tab/Clash_Reports.panel/History.stack/Clash_Delta.pushbutton/icon.small.dark.pngCoordinate.tab/Clash_Reports.panel/History.stack/Clash_Delta.pushbutton/icon.small.pngCoordinate.tab/Clash_Reports.panel/History.stack/Clash_Delta.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Clash Delta, 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 Delta 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/History.stack/Clash_Delta.pushbutton/script.py View on GitHub# -*- coding: utf-8 -*-
"""Compares the chosen clash tests now with a snapshot: new, fixed, still open and changed clashes."""
from pynavis import script, toast
from namo import clashrep_forms as cf
from namo import clashrep_history as hist
from namo import clashreport as cr
from namo import items, rep_clash_delta as rep
from namo import ui
TITLE = 'Clash Delta'
DEFAULTS = {'tests': [], 'xlsx': False, 'select': False}
def run():
from namo import clashdata
values = script.get_config(DEFAULTS)
if cf.runner_active():
cf.run_saved('clash_delta', values, {'baseline': 'auto'})
return
doc = cr.active_doc()
problem = cf.start(doc)
if problem:
toast.show(*problem)
return
doc_path = cr.file_info(doc)[0]
if not doc_path:
toast.info('Save the model first', 'Clash snapshots are kept per model file, so an unsaved model has none.')
return
entries = clashdata.list_history(doc_path)
if not entries:
toast.info('No clash snapshots yet',
'Take one with Snapshot (or turn on automatic snapshots), then compare after the next run.')
return
tests = cf.pick_tests(TITLE, 'Tick the tests to compare.', 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
names = clashdata.unique_names([t.DisplayName for t in tests])
newest_first = sorted(entries, key=lambda e: (e.get('time') or '', e.get('id') or ''), reverse=True)
choices = [(hist.entry_text(e, names), e['id']) for e in newest_first]
default = hist.pick_baseline(entries)
path = cr.default_path(rep.NAME_TEMPLATE, 'xlsx', doc)
answers = ui.form(TITLE, cf.delta_fields(values, choices, default['id'], path), ok='Compare', width=640)
if answers is None:
return
values.update({'tests': cf.test_paths(tests), 'xlsx': answers['xlsx'], 'select': answers['select']})
script.save_config(values)
config = {'tests': values['tests'], 'baseline': answers['baseline'], 'xlsx': answers['xlsx'],
'path': answers['path'] if answers['xlsx'] else ''}
result = cf.run_report('clash_delta', config, TITLE, doc)
if result is None:
return
detail = result['detail']
if answers['select'] and result['level'] in ('success', 'warning'):
found = result.get('new_items') or []
if found:
count = items.select(found, zoom=True, doc=doc)
detail = '%s Selected %s of the new clashes.' % (detail, cr.plural(count, 'item'))
else:
detail = '%s No new clashes to select.' % detail
toast.show(result['level'], result['message'], 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.clashdataOne reader for every clash tool: snapshots, groups, run-to-run comparison, history, images, and the per-result edits that are safe at scale.namo.clashrep_formsThe questions the Clash Reports buttons ask, in one place.namo.clashrep_historyClash history maths for Clash Delta, Clash Trends and the automatic snapshot: which snapshot to compare with, what changed since, and the series over time. Pure.namo.clashreportClash reports: the row shaping, summaries and tallies every Clash Reports tool shares.namo.itemsModel items: walking, collecting, identifying, measuring and showing them.namo.rep_clash_deltaClash Delta: the chosen tests now against a clash snapshot.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/History.stack/Clash_Delta.pushbutton/bundle.yaml View on GitHubtitle: Clash Delta
tooltip: Compares the chosen clash tests now with a snapshot: new, fixed and still open clashes and status changes, in the output window and an optional workbook.
context: clash-tests