Clash panel

Clash Report

A one-screen count of every clash test by status, with a CSV export for the report.

On the ribbonButton, Clash panel
NeedsNothing (a document with no tests is told so)

What it does#

Prints one row per Clash Detective test with its total and the count in each status: New, Active, Reviewed, Approved and Resolved. A line underneath totals the tests and the results. It is the number you read out at the start of the meeting, and the evidence line in the weekly report, without opening Clash Detective and adding the columns up by eye.

How to use it#

  1. Run or refresh your clash tests in Clash Detective as usual.
  2. Click Clash Report. The table appears in the output window.
  3. Answer the question that follows: export the same table to CSV? Yes asks where to save it.

Limitations#

  • Counts only. It does not list individual clashes; that is what the Clash Detective report and Clash Grouper are for.
  • Needs Navisworks Manage. Simulate has no Clash Detective, and the tool says so in a dialog rather than failing.
  • Groups count as one result each, the same way Clash Detective's own summary counts them.

Other uses#

  • Export the CSV every week into the same folder and you have a trend line of open clashes for free.
  • Paste the table into the meeting minutes as the state of play at the time of the meeting.

Source#

The tool's own files, word for word as shipped in Clash.panel/Clash_Report.pushbutton. Every pyNavis tool is an ordinary bundle: copy these into your own extension and change what you like.

script.py Runs on a click. View on GitHub
"""Summarizes every Clash Detective test (result counts by status), with CSV export."""

import csvexport

from pynavis import clash, forms, output

STATUSES = ['New', 'Active', 'Reviewed', 'Approved', 'Resolved']

summaries = clash.summarize()
if not summaries:
    forms.alert('This document has no clash tests.')
else:
    headers = ['Test', 'Total'] + STATUSES
    rows = [
        [s['name'], s['total']] + [s['by_status'].get(status, 0) for status in STATUSES]
        for s in summaries
    ]
    print(output.format_table(rows, headers))
    total = sum(s['total'] for s in summaries)
    print('\n%d test(s), %d result(s) in total.' % (len(summaries), total))

    if forms.confirm('Export this clash summary to CSV?'):
        path = forms.save_file(default_name='clash_report.csv', title='Export clash report')
        if path is not None:
            csvexport.write_rows(path, headers, rows)
            print('Exported to %s' % path)
bundle.yaml The bundle contract: the keys pyNavis reads for this tool. View on GitHub
title: Clash\nReport