Table of Contents

View Template Comparer (VTC)

View Template Comparer compares two Revit view templates side-by-side, lets you choose per-setting values, stages category override edits locally, and applies everything through one Process action.


REV2 Workflow (Current)

  1. Select Left and Right templates.
  2. Click value cells to choose which side wins per setting.
  3. Use per-side edit icons in each category row (pencil on Left/Right cell) or Inspector-side edit buttons to edit a specific side explicitly.
  4. (Optional) Use Clear selection in Inspector to unselect a row without losing staged edits.
  5. Review pending changes in the Preview tab.
  6. Click Process, choose output mode, and confirm.

Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:563 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:317 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:385 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1297 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1326 Source: src/Tools/Testing/VTC/UI/Resources/VtcBodyTemplates.xaml:332


What "Process" Does

Process opens a confirmation dialog with a compact preview list and three output modes:

  • Overwrite Left
  • Overwrite Right
  • Create Merged Template

The dialog enforces validity for merged-template naming and disables the Process button when invalid. VTC also disables Process until there is at least one selected row or at least one staged override that is currently eligible to apply.

For Create Merged Template, if you select the side where a keyed item is missing (for example a left-only include/filter/category/workset selected to the right side), that item is removed from the merged template rather than kept from the base side.

For missing-side selections in category/workset/linked-file rows, Create Merged now clears the base-side override state instead of silently keeping it (categories reset to default graphics state, worksets reset to Use Global Setting, linked files reset to By Host View).

For Overwrite Left/Right (and snapshot-style applies), selecting the missing side in a category/workset/linked-file row is treated as an explicit reset to default state (not a no-op), so base-side overrides are not silently preserved.

Source: src/Tools/Testing/VTC/Revit/Services/VtcComparisonService.cs:381 Source: src/Tools/Testing/VTC/Revit/Services/VtcComparisonService.cs:1403 Source: src/Tools/Testing/VTC/Revit/Services/VtcComparisonService.cs:1702

If Process reports conflicts, failed staged category override edits are retained so you can retry without re-entering them. When a failed pending key is no longer present in the rebuilt diff tree, the pending edit still stays in Preview and remains eligible for retry.

Source: src/Tools/Testing/VTC/UI/ViewModels/VtcProcessDialogBodyViewModel.cs:13 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcProcessDialogBodyViewModel.cs:70 Source: src/Tools/Testing/VTC/UI/Resources/VtcBodyTemplates.xaml:354 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:591 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1511 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1620 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1773 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1898 Source: src/Tools/Testing/VTC/Revit/Services/VtcComparisonService.cs:376 Source: src/Tools/Testing/VTC/Revit/Services/VtcComparisonService.cs:1395 Source: src/Tools/Testing/VTC/Revit/Services/VtcComparisonService.cs:1694


Selection + Local Override Rules

Local override edits are preview-only until Process

Category override edits are staged as pending local edits and reflected immediately in left/right displays. Inspector now provides explicit Use Left / Use Right plus Clear selection actions. Tree rows expose explicit per-side edit entrypoints so edit actions and selection actions are separate.

For category override rows, the Inspector selection actions are available even when the row itself is not merge-selectable (for example when the templates are currently equal for that category), so you can reselect the edited side after clearing selection.

Source: src/Tools/Testing/VTC/UI/ViewModels/VtcDiffTreeNode.cs:87 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1288 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:729 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:317

Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1274 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcDiffTreeNode.cs:213 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcDiffTreeNode.cs:230 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:722 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:750 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:317 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1326

Pending edits are side-coupled

A pending override applies only when the current selection side for that key matches the edited side. Flipping to the opposite side removes the pending override for safety. Clearing selection to None keeps the staged edit locally but makes it ineligible until you reselect the matching side.

Source: src/Tools/Testing/VTC/Contracts/VtcDataModels.cs:224 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1546 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1839 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1781

Swap/rebuild clears pending local edits

Changing template pairing, swapping left/right, or rebuilding the comparison clears pending/local edits and shows an explicit notice.

Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:541 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1391 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1886


Preview Tab

The Preview tab now uses a full hierarchical TreeView that mirrors the diff hierarchy, but only shows process-targeted writes:

  • selected settings,
  • pending override edits that are currently eligible for Process,
  • and a dedicated section for retained pending overrides whose diff row no longer exists.

Selecting a navigable preview leaf jumps to the corresponding diff row.

Navigation behavior:

  • Clears hiding filters (SearchText, ViewFilter=All, ConflictFilter=All)
  • Selects the target row
  • Expands only the target path and scrolls into view (BringIntoView) without expanding unrelated branches

Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1217 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:458 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1943 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml.cs:139 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml.cs:153


Visual Semantics

  • Diff meaning is shown by diff backgrounds and diff glyphs.
  • Selection meaning is shown with gold border + checkmark + glow.
  • Manually staged category edits now show an Edited badge with side-colored dots in TreeView, Inspector, and Preview.
  • Conflict visuals override selection visuals so conflicts stay unambiguous.
  • The diff-only +R marker uses a muted neutral color (not gold).
  • Hover no longer overlays dark row backgrounds on diff cells; diff tint remains visible and hover emphasis is typography-based.

Source: src/Tools/Testing/VTC/UI/Resources/VtcDiffStyles.xaml:20 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:276 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1140 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:687


Bottom Panel Actions

The window footer uses the standard BottomPanel pattern:

  • Close button
  • Process button (disabled when there are no selections and no process-eligible staged edits)

Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1330 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1607


Library (Save/Load)

VTC supports local cache save/load of full template snapshots.

  • Cache path: %APPDATA%/DBTools/Cache/VTC/
  • Save/Load actions remain in the Library tab
  • Save menu supports Left Template, Right Template, and Merged Template
  • The split button is labeled Save Template ▾ and explicitly calls out the merged-save option in helper text.
  • Merged Template save uses current selections plus eligible staged override edits to write a merged cache model without writing to Revit

Export/Import/Dump transfer actions are removed from the REV2 UI/workflow.

Source: src/Tools/Testing/VTC/Services/VtcTemplateStorageService.cs:15 Source: src/Tools/Testing/VTC/Services/VtcTemplateStorageService.cs:34 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1279 Source: src/Tools/Testing/VTC/UI/Views/VtcWindow.xaml:1303 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1365 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:1687 Source: src/Tools/Testing/VTC/UI/ViewModels/VtcWindowViewModel.cs:2089