Sample Code Revit Batch Processor 1.1.16 documentation
FamilyReloaderUI is a Revit add-in for batch reloading families. It lists all families in the open Revit document, searches a library directory for matching .rfa files, and lets you reload selected families — either updating existing types only or loading all types from the library files.
The main window is divided into the following sections from top to bottom:
Section |
Purpose |
|---|---|
Header banner |
Shows the application title and subtitle |
Message banner |
Displays status messages and validation errors |
Families data grid |
Lists all families in the open Revit document |
Library path section |
Specify and search the family library directory |
Reload mode selector |
Choose how types are handled during reload |
Reload button |
Execute the reload for all selected families |
The central grid lists every family loaded in the open Revit document.
Column |
Type |
Editable |
Description |
|---|---|---|---|
Reload |
Boolean (checkbox) |
Yes |
Tick to include this family in the reload operation |
Family Name |
Text |
No |
Name of the family in the Revit document |
Family Category |
Text |
No |
Revit category the family belongs to (e.g., Doors, Windows) |
IsShared |
Boolean |
No |
Whether the family is a shared family |
Match Status |
Text |
No |
Result of the library search: |
Family Last Updated |
Date/Time |
No |
Last modification date of the matching library file |
Status |
Meaning |
|---|---|
SingleMatch |
Exactly one matching |
MultipleMatches |
More than one matching file was found — the match is ambiguous and the family cannot be reloaded until resolved |
NoMatch |
No matching file was found in the library directory |
Only families with a SingleMatch status should be ticked for reload. Families with other statuses cannot be reloaded reliably.
The grid supports extended selection. The Reload checkbox is the only editable column — tick it on the rows you want to include in the batch reload.
This section specifies the directory to search for family files.
Control |
Description |
|---|---|
Library Path text box |
Full path to the folder containing your |
Incl Sub Directories checkbox |
When ticked, the search includes all subdirectories of the library path |
Browse button |
Opens a folder picker dialog to select the library directory |
Update button |
Searches the library directory and updates the Match Status and Family Last Updated columns for all families. Enabled only when a valid library path is entered |
Rule |
Behaviour |
|---|---|
Library path must not be empty |
Error shown below the text box if blank |
Library path must exist on disk |
Error shown below the text box if the directory does not exist |
While any validation error is present, the Reload Families button remains disabled.
Two mutually exclusive radio buttons control how family types are handled during the reload.
Option |
Behaviour |
|---|---|
Import All Types On Reload |
All types defined in the library |
Reload Existing Types Only |
Only types that already exist in the document are updated; no new types are added |
The following settings are saved automatically between sessions:
Setting |
Description |
|---|---|
Library path |
The last used library directory path |
Include Sub Directories |
The last state of the subdirectory checkbox |
Reload mode |
Whether Import All Types or Reload Existing Types was selected |
Column configuration |
Which columns are visible and their order |
Settings are stored in %LocalAppData%\duHast\Reloader_settings.json.
Launch FamilyReloaderUI from the Revit ribbon with a document open.
The families grid populates with all families in the document.
Enter the path to your family library in the Library Path field, or click Browse.
Optionally tick Incl Sub Directories to search subdirectories.
Click Update to search the library and populate the Match Status and Last Updated columns.
Review the grid. Tick Reload on families with a SingleMatch status that you want to reload.
Select a reload mode: Import All Types or Reload Existing Types Only.
Click Reload Families to execute the batch reload and close the window.