Coordinate > Issues
Coordination Report
Writes the issue register as an HTML page and an Excel workbook: open, overdue and due-this-week counts, open issues by trade, priority and age, the overdue list, a section per trade with snapshots, and what closed recently. Shift+Click for formats and folder.
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/Issues.panel/Coordination_Report.pushbutton/bundle.yamlCoordinate.tab/Issues.panel/Coordination_Report.pushbutton/config.pyCoordinate.tab/Issues.panel/Coordination_Report.pushbutton/icon.dark.pngCoordinate.tab/Issues.panel/Coordination_Report.pushbutton/icon.pngCoordinate.tab/Issues.panel/Coordination_Report.pushbutton/icon.small.dark.pngCoordinate.tab/Issues.panel/Coordination_Report.pushbutton/icon.small.pngCoordinate.tab/Issues.panel/Coordination_Report.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Coordination Report, 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. Coordination Report is on the Coordinate tab, Issues 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/Issues.panel/Coordination_Report.pushbutton/script.py View on GitHub# -*- coding: utf-8 -*-
"""Writes the coordination report (HTML and Excel) from the issue register and opens it."""
import os
from pynavis import script, toast
from namo import issuestore, progress, rep_coordination, reports, ui
def run():
me = script.bind()
config = me.get_config(rep_coordination.default_config())
doc = issuestore.active_doc()
store = issuestore.for_doc(doc) if doc is not None else None
if not str(config.get('folder') or '').strip() and store is not None and store.saved:
config['folder'] = os.path.dirname(store.doc_path)
result = progress.run('Coordination report', lambda report: reports.run(
'coordination', config, doc=doc, interactive=True, progress=report))
if result is progress.CANCELLED or result.get('cancelled'):
return
toast.show(result['level'], result['message'], result['detail'])
if result['level'] == 'success' and config.get('open_after') and result['paths']:
try:
ui.open_path(result['paths'][0])
except Exception as error:
toast.warning('The report was written but could not be opened', str(error))
run()
config.py
The Shift+Click action.
Coordinate.tab/Issues.panel/Coordination_Report.pushbutton/config.py View on GitHub# -*- coding: utf-8 -*-
"""Options for the Coordination Report: formats, thumbnails, trades, folder and file name."""
from pynavis import script, toast
from namo import config as namo_config
from namo import rep_coordination, ui
values = script.get_config(rep_coordination.default_config())
trades = namo_config.get('trades') or []
fields = [
{'kind': 'multi', 'key': 'formats', 'label': 'Write',
'options': [('HTML page', 'html'), ('Excel workbook', 'xlsx')],
'default': values.get('formats') or ['html', 'xlsx']},
{'kind': 'check', 'key': 'thumbnails', 'label': 'Snapshot thumbnails in each trade section',
'default': bool(values.get('thumbnails'))},
{'kind': 'int', 'key': 'max_thumbnails', 'label': 'Thumbnails, at most', 'min': 0, 'max': 2000,
'default': values.get('max_thumbnails'), 'enabled_if': ('thumbnails', True)},
{'kind': 'multi', 'key': 'trades', 'label': 'Trades (none ticked: every trade)',
'options': trades, 'default': [t for t in values.get('trades') or [] if t in trades]},
{'kind': 'check', 'key': 'include_void', 'label': 'Include void issues',
'default': bool(values.get('include_void'))},
{'kind': 'folder', 'key': 'folder', 'label': 'Folder', 'default': values.get('folder') or '',
'hint': 'Blank: the model\'s own folder.'},
{'kind': 'text', 'key': 'name_template', 'label': 'File name',
'default': values.get('name_template') or '{file} - Coordination report - {date}',
'hint': 'Tokens: {file} {date} {project} {user}.'},
{'kind': 'check', 'key': 'open_after', 'label': 'Open the page when it is written',
'default': bool(values.get('open_after'))},
]
def check(answers):
if not answers['formats']:
return {'formats': 'Tick at least one format.'}
if not answers['name_template'].strip():
return {'name_template': 'Give the file a name.'}
return None
answers = ui.form('Coordination report options', fields, ok='Save', width=520, validate=check)
if answers is not None:
values.update(answers)
script.save_config(values)
toast.success('Saved Coordination Report options', rep_coordination.describe(values))
Library modules this tool uses
From the shared namo library, which installs with every tool. Each name opens the module on GitHub.
namo.configPlayground-wide settings: one JSON file shared by every Playground tool.namo.issuestoreWhere Playground issues live: one record per issue, per model file, in the data mode namo.config chooses, plus the session events every issue view listens to.namo.progressGlue between pyNavis' cancellable progress window and Playground's progress callbacks.namo.rep_coordinationCoordination Report: the issue register as an HTML page and a workbook.namo.reportsThe registry of automation-ready reports, and the helpers every report shares.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/Issues.panel/Coordination_Report.pushbutton/bundle.yaml View on GitHubtitle: Coordination\nReport
tooltip: Writes the issue register as an HTML page and an Excel workbook: open, overdue and due-this-week counts, open issues by trade, priority and age, the overdue list, a section per trade with snapshots, and what closed recently. Shift+Click for formats and folder.
context: doc