Shared Parameters Loader
Streamline shared parameter management in Revit families with batch loading, intelligent duplicate detection, and version-aware API support across Revit 2023 and 2024+.
Project Overview
Shared Parameters Loader is a professional pyRevit tool built with IronPython that streamlines shared parameter management for BIM managers and family authors. The tool enables bulk loading of shared parameters from the Revit Shared Parameter File (.txt) directly into the active family—eliminating the tedious process of adding parameters one-by-one through Revit's native interface.
Designed exclusively for Family Editor context, the tool integrates seamlessly with Revit's configured Shared Parameter File (set via File > Options > Shared Parameters). It iterates through all groups and definitions in the SP file, presents a multi-select dialog for parameter selection, and adds them to the family in a single transaction with full duplicate detection and error reporting.
Key Features
- Bulk Parameter Loading: Add multiple shared parameters to a family in one operation
- Multi-Select Dialog: pyRevit forms.SelectFromList with name_attr for clean parameter display including group context
- Instance vs Type Choice: Apply all selected parameters as Instance or Type parameters per run
- Parameter Group Selection: Choose from 24 available groups (General, Dimensions, Identity Data, Constraints, etc.) for where parameters appear in the family
- Version-Aware API: Revit 2024+ uses GroupTypeId; Revit 2023 and earlier use BuiltInParameterGroup
- Duplicate Detection: Skips parameters already present in the family
- Transaction-Wrapped Batch Addition: FamilyManager.AddParameter called within a single transaction for data integrity
- Detailed Output Report: Shows added parameters, skipped duplicates, and errors via pyRevit output
Technical Implementation
- pyRevit Framework: Built on pyRevit with revit, forms, script, and DB modules
- IronPython: Python 2.7–compatible syntax for Revit's scripting host
- Shared Parameter File Access: Uses Application.OpenSharedParameterFile() to read the configured SP file
- ParamChoice Class: Wrapper with name, definition, and group_name for clean display in selection dialog
- Family Context Validation: Exits with alert if run outside Family Editor
- Transaction Management: Single "Bulk Add Shared Parameters" transaction for all additions
Technical Specifications
Architecture
- Framework: pyRevit
- Language: IronPython (Python 2.7)
- API: Autodesk Revit API (FamilyManager, ExternalDefinition, Transaction)
- Context: Family Editor only
- SP File: Revit Shared Parameter File (.txt) from File > Options
Parameter Groups Supported
- Constraints, Construction, Data, Dimensions (Geometry), Electrical (Circuiting, Lighting, Loads), Energy Analysis, Fire Protection, General, Graphics, Green Building Properties, Identity Data, IFC Parameters, Materials and Finishes, Mechanical (Airflow, Loads), Phasing, Plumbing, Structural, Structural Analysis, Text, Visibility
Core Flow
- 1. Validate Family Editor context
- 2. Open Shared Parameter File
- 3. Iterate groups and definitions, build ParamChoice list
- 4. Multi-select dialog (SelectFromList, name_attr="name")
- 5. Instance vs Type dialog
- 6. Parameter group (section) selection from 24 groups
- 7. Duplicate detection via FamilyManager.GetParameters()
- 8. Transaction-wrapped FamilyManager.AddParameter for each non-duplicate
- 9. Output report: added, skipped, errors
Use Cases
Standard Family Development
Efficiently add project-standard shared parameters (e.g., COBie, IFC, custom scheduling fields) to new or existing families without manual one-by-one addition
Template and Library Maintenance
Batch-enrich family library content with consistent shared parameters for scheduling, coordination, and data handover
BIM Coordination and Data Exchange
Align families with shared parameter standards required for coordination, clash resolution, and downstream tools
Project Impact
Time Reduction
Bulk loading eliminates repetitive manual parameter addition per family
Parameter Groups
Full support for all Revit parameter sections with version-aware API
Duplicates
Automated duplicate detection prevents redundant parameters and reporting