Project > 4D
Schedule Health
Checks the TimeLiner schedule for tasks with nothing attached, missing or reversed dates, zero durations, objects in several tasks and objects in no task, scores it out of 100 and opens the report. Shift+Click for options.
Status
Untested Never executed inside Navisworks. Passed the headless checks only.
The public ask
No public source is on record for this tool.
Installs with
Schedule Health 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.
Project.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/bundle.yamlProject.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/config.pyProject.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/icon.dark.pngProject.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/icon.pngProject.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/icon.small.dark.pngProject.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/icon.small.pngProject.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Schedule Health, 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. Schedule Health is on the Project tab, 4D 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.
Project.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/script.py View on GitHub# -*- coding: utf-8 -*-
"""Checks the TimeLiner schedule (attachments, dates, overlaps, coverage) and opens a scored report."""
from pynavis import script, toast
from namo import fourd_common, progress, reports, ui
TITLE = 'Schedule Health'
DEFAULTS = {'coverage': True, 'create_set': True}
def run():
values = script.get_config(DEFAULTS)
if ui.is_runner():
result = reports.run('schedule_health', values, interactive=False)
toast.show(result['level'], result['message'], result['detail'])
return
doc = fourd_common.active_doc()
config = fourd_common.report_config(reports.default_config('schedule_health'),
fourd_common.default_path(doc, 'Schedule health', 'html'))
config.update(values)
result = progress.run(TITLE, lambda report: reports.run('schedule_health', 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'] in ('success', 'warning') and result['paths']:
fourd_common.open_file(result['paths'][0])
run()
config.py
The Shift+Click action.
Project.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/config.py View on GitHub# -*- coding: utf-8 -*-
"""Options for Schedule Health: the coverage walk and the Not scheduled set."""
from pynavis import script, toast
from namo import ui
DEFAULTS = {'coverage': True, 'create_set': True}
def run():
if ui.is_runner():
return
values = script.get_config(DEFAULTS)
fields = [
{'kind': 'check', 'key': 'coverage', 'label': 'Check coverage: objects in no task and in several tasks',
'default': bool(values.get('coverage', True)),
'hint': 'Reads every task\'s items and every object in the model; slower on big models.'},
{'kind': 'check', 'key': 'create_set', 'label': 'Save objects in no task as the set Playground/Not scheduled',
'default': bool(values.get('create_set', True)), 'enabled_if': ('coverage', True)},
]
answer = ui.form('Schedule Health options', fields, ok='Save')
if answer is None:
return
values.update({'coverage': bool(answer['coverage']), 'create_set': bool(answer['create_set'])})
script.save_config(values)
toast.success('Saved the Schedule Health options',
'Coverage on.' if values['coverage'] else 'Coverage off: dates and attachments only.')
run()
Library modules this tool uses
From the shared namo library, which installs with every tool. Each name opens the module on GitHub.
namo.fourd_commonHelpers the 4D, Quantities and Field tools share: scopes, default files, text.namo.progressGlue between pyNavis' cancellable progress window and Playground's progress callbacks.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.
Project.tab/4D.panel/Schedule_Tools.stack/Schedule_Health.pushbutton/bundle.yaml View on GitHubtitle: Schedule Health
tooltip: Checks the TimeLiner schedule for tasks with nothing attached, missing or reversed dates, zero durations, objects in several tasks and objects in no task, scores it out of 100 and opens the report. Shift+Click for options.
context: doc