Project > Models
Source Files
A panel listing every appended model with its type, units, file time and item count, flagging files that are out of date or missing. Tick to show or hide a model; isolate, select, zoom, open its folder, refresh changed files or remove models from here.
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.
Events it listens to
None. It runs only when you click it.
Files
Paths are relative to the Playground.extension folder.
Project.tab/Models.panel/Source_Files.dockpane/bundle.yamlProject.tab/Models.panel/Source_Files.dockpane/icon.dark.pngProject.tab/Models.panel/Source_Files.dockpane/icon.on.dark.pngProject.tab/Models.panel/Source_Files.dockpane/icon.on.pngProject.tab/Models.panel/Source_Files.dockpane/icon.pngProject.tab/Models.panel/Source_Files.dockpane/icon.small.dark.pngProject.tab/Models.panel/Source_Files.dockpane/icon.small.pngProject.tab/Models.panel/Source_Files.dockpane/pane.xamlProject.tab/Models.panel/Source_Files.dockpane/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Source Files, 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. Source Files is on the Project tab, Models 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 fills the panel; it receives the panel as __pane__.
Project.tab/Models.panel/Source_Files.dockpane/script.py View on GitHub# -*- coding: utf-8 -*-
"""Lists the appended models live: visibility, type, units, file time, out-of-date files and item counts.
All of the behaviour is in lib/namo/sourcefiles.py. Reload re-runs this script
against fresh controls; attach() first detaches the previous run's timer and event
subscriptions, which it keeps in a session holder, the way the shipped Viewpoint
Tracker does.
"""
from namo import sourcefiles
from pynavis import script
sourcefiles.attach(__pane__, script.get_logger())
pane.xaml
The dock panel's content.
Project.tab/Models.panel/Source_Files.dockpane/pane.xaml View on GitHub<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="Root" Focusable="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- No colours here: script.py paints the paper, rows and hairlines from the
pyNavis design system tokens, which follow the Navisworks theme. The
toolbar buttons are DesignSystem quiet buttons added by the script. -->
<WrapPanel x:Name="Toolbar" Grid.Row="0" Margin="8,8,4,4"/>
<Border x:Name="Rule" Grid.Row="1" Height="1"/>
<ScrollViewer x:Name="Scroller" Grid.Row="2" Focusable="False"
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<StackPanel x:Name="Rows"/>
</ScrollViewer>
<TextBlock x:Name="Status" Grid.Row="3" Margin="12,6,12,8" FontSize="11.5"
TextWrapping="Wrap" Text=""/>
</Grid>
Library modules this tool uses
From the shared namo library, which installs with every tool. Each name opens the module on GitHub.
namo.sourcefilesThe Source Files dock pane: a live list of the appended models.
bundle.yaml
The bundle contract: the keys pyNavis reads for this tool.
Project.tab/Models.panel/Source_Files.dockpane/bundle.yaml View on GitHubtitle: Source Files
tooltip: A panel listing every appended model with its type, units, file time and item count, flagging files that are out of date or missing. Tick to show or hide a model; isolate, select, zoom, open its folder, refresh changed files or remove models from here.
keytip: SF