Back to Projects

Arc Code & Element Name Renamer

pyRevit tool for standardizing family naming conventions after template merging—bulk converting arc codes to product codes and enforcing Title Case across Revit elements.

Python pyRevit WPF/XAML IronPython Revit API

Project Overview

When an electrical Revit template was merged with an architectural template to create a unified workflow, designers gained the ability to work in a single model instead of linking and maintaining two separate templates. However, the merge introduced a naming conflict: the electrical template used arc codes in family names while the architectural template followed product codes as the standard convention. Producing two separate BOQs (Bills of Quantities) from linked models was no longer necessary, but the inconsistent naming across the merged template threatened data integrity and downstream workflows.

The Arc Code & Element Name Renamer addresses this business problem by providing a professional pyRevit tool that bulk-renames all families from arc code convention to product code convention, and enforces consistent Title Case naming for element names throughout the model. This ensures a single, standardized template that meets BIM best practices and simplifies documentation and quantification.

Key Features

  • Arc-to-Product-Code Bulk Rename: Convert all families using arc codes to product code naming convention across the entire model
  • Title Case Conversion: Automatically fix uppercase element names to Title Case while preserving short acronyms (3 chars or less like ARC, STR) and words with digits (120V, 20A)
  • WPF/XAML UI: Professional interface with category filtering dropdown, search, and select-all/deselect-all controls
  • Live Preview Panel: See old name vs. new name in real time before applying changes
  • Custom Name Editing: Manually override any auto-generated name for specific elements
  • Rename History & Undo: Full undo/revert capability with rename history tracking
  • Check Fixes Mode: Scans for lowercase acronyms that should be uppercase and flags them for correction
  • Transaction-Based Renaming: Proper Revit API transaction management with error handling for read-only and system elements

Technical Implementation

  • Python & IronPython: Built with pyRevit framework using IronPython runtime
  • WPF/XAML: Native Windows Presentation Foundation user interface
  • Revit API FilteredElementCollector: Efficient collection of Families, Family Types, and named instances (Levels, Grids, Views, Sheets, Rooms)
  • Transaction Management: Robust transaction handling for safe model modification with rollback on failure
  • Title Case Logic: Custom algorithm preserving acronyms and technical notation (voltages, amperages)

Technical Specifications

Architecture
  • Framework: pyRevit (IronPython)
  • UI Framework: WPF (Windows Presentation Foundation) / XAML
  • API: Autodesk Revit API
  • Language: Python (IronPython 2.7)
  • Platform: Windows (Revit host)
  • Element Scopes: Families, Family Types, Levels, Grids, Views, Sheets, Rooms
Core Components
  • Category Filter: Dropdown filtering for targeted element selection
  • Search & Selection: Search box with select-all/deselect-all functionality
  • Preview Panel: Live old-name vs. new-name comparison
  • Title Case Engine: Acronym-aware conversion with digit preservation
  • History Manager: Rename history tracking with full undo/revert
  • Transaction Handler: Error handling for read-only and system elements

Use Cases

Template Standardization

Unify naming conventions across merged architectural and electrical templates so a single BOQ and documentation set can be produced from one model

Naming Convention Enforcement

Enforce project-wide Title Case and product code standards for consistency in schedules, legends, and exported data

Post-Merge Cleanup

Rapidly clean up legacy arc code families and inconsistent element names after template or project mergers

Project Impact

90%
Time Reduction

Bulk renaming eliminates manual element-by-element name updates across hundreds of families and types

100%
Naming Consistency

Standardized product codes and Title Case ensure predictable naming across all model elements

Full Undo
Safe Rollback

Rename history with full undo capability prevents irreversible changes and supports iterative refinement