Multi-Corridor Parameter Control
Select as many corridor instances as you need — even across different families that Revit can't batch-edit natively — and control all their shared parameters together from a single editable grid.
Solving Revit's Cross-Family Limitation
Revit's native Properties panel can only batch-edit instance parameters when all selected elements are instances of the exact same family type. AutoBRIDGE corridors often span multiple families — different cross-sections, different girder families per span — so Revit offers no way to select them all and change a shared parameter like Asphalt_Thickness in one step.
The Parameter Control tool (ParameterControl.cs) breaks this constraint. It collects every writable parameter across all corridor instances you select, shows them in a single editable grid, and applies your changes to every selected instance in one Revit transaction — regardless of how many different families they belong to.
Cross-Family
Edit shared parameters across instances of completely different corridor families simultaneously.
Search Filter
Type to filter the Available Instances list — find specific corridor segments by name instantly.
Varies Detection
Parameters with different values across instances show [varies] — you know exactly which ones need reconciling.
Selective Activate
Each parameter row has a checkbox — only activated rows are written. Review all, change only what you need.
One Transaction
All changes commit in a single Revit transaction — one Ctrl+Z undoes everything.
SubcategorySolid or SubcategoryVoid parameter. These are the AutoBRIDGE corridor and slab families. Generic Revit families without these parameters will not appear in the list.
Form Layout — Five Zones
| # | Zone | Purpose |
|---|---|---|
| 1 | Available Instances (Top-left, 46 %) | Search box + listBox1 — all AutoBRIDGE instances in the project, multi-selectable. |
| 2 | Transfer Buttons (Top-centre, 8 %) | >> adds selections to the right list; << returns them to the left. |
| 3 | Selected Instances (Top-right, 46 %) | listBox2 — the instances whose parameters will be read and modified. |
| 4 | Parameter Grid (Bottom half) | dataGridView1 — three columns: Parameter name (read-only), Value (editable when activated), Activate checkbox. |
| 5 | Run Bar (Bottom, 65 px) | button8 "RUN" — cyan, right-docked. Applies all activated parameter changes. |
Why Standard Revit Can't Do This
Understanding the limitation that this tool solves helps you use it more effectively.
The Revit Cross-Family Restriction
In Revit, when you select multiple instances in the model and open Properties, Revit only shows parameters that are shared across all selected element types. If you select two corridor segments from different families — even if both have a parameter named Depth — Revit will show no parameters at all unless both instances are of the same family type.
This is a hard platform limitation. It means editing a corridor that spans multiple span families (common in long bridges) requires opening each segment individually, one at a time.
The Available Instances List
The left panel (top half of the form) shows all AutoBRIDGE corridor instances in the project. A search box filters the list so you can find specific segments in large projects quickly.
Browse and Search Available Instances
On form load, PopulateLayerComboBox() scans all FamilyInstance objects in the project for those that have either a SubcategorySolid or SubcategoryVoid parameter. These are the AutoBRIDGE corridor and slab families. Each matching element's name is added to listBox1.
The search box (textBox1) above the list filters in real time. Each keystroke clears listBox1 and repopulates it from the original name list, keeping only items containing the search text (case-insensitive).
Multi-Select Instances
listBox1 uses SelectionMode.MultiExtended — the same familiar keyboard behaviour as Windows Explorer:
- Click — select one item, deselect others
- Ctrl + Click — toggle individual items without losing other selections
- Shift + Click — select a contiguous range
Select as many instances as you need — there is no limit.
Build the Selected Instances List
The centre column contains two transfer buttons that move instances between the Available list (left) and the Selected list (right). Only instances in the Selected list will have their parameters read and modified.
Transfer Instances with >> and <<
Select items in listBox1 and click >> to move them to listBox2 (Selected Instances). The moved items are removed from listBox1 to keep the lists mutually exclusive. Click << to return selected items from listBox2 back to listBox1.
Every time listBox2 is changed — either by adding or removing items — PopulateCommonParameters() runs automatically to refresh the parameter grid below.
The Parameter Grid
The lower half of the form (below the splitter) contains a DataGridView with three columns that shows all writable parameters found across the selected instances, with a checkbox-based activation system for selective editing.
How Parameters Are Collected
PopulateCommonParameters() loops through every element in listBox2, reads all their parameters, and aggregates them into the grid. Only writable parameters of type Double, Angle, or String are included. Read-only and the following internal AutoBRIDGE parameters are excluded:
SubcategorySolid/SubcategoryVoid— category assignment parametersInitialRotation/AutoBRIDGE_Type— system parameters- IFC parameters (
IfcGUID,IFC Predefined Type, etc.)
Understand the Three Columns
| Column | Behaviour |
|---|---|
| Parameter (read-only) | Parameter name in grey. Turns black when the row is activated. |
| Value (conditionally editable) | Shows the current value in metres (double parameters converted from Revit feet: × 0.3048); angles in degrees (× 180/π). Shows [varies] if values differ across selected instances. Read-only until the Activate checkbox is ticked — then turns editable with a light blue background. |
| Activate (checkbox) | Enables editing and marks the row for writing on RUN. Only activated rows are processed. Rows with [varies] that are activated and left as [varies] will show an error on RUN and be skipped. |
Edit Parameter Values
Tick the Activate checkbox on any row to make its Value cell editable. Type the new value in metres for length parameters, or degrees for angles. The grid does not validate units during input — the conversion happens at RUN time.
[varies] and do not change the value, RUN will show a dialog: "The parameter has a varying value and cannot be set." Either type a new uniform value or leave the row deactivated.
Run — Apply Parameter Changes
The cyan RUN button opens a single Revit transaction and writes every activated, non-[varies] parameter to every element in the Selected Instances list.
Click RUN — One Transaction for All Instances
The button8_Click handler opens a Revit transaction named "Update Parameters" and loops through every row in the grid. For each activated row with a valid (non-[varies]) value, it loops through every element name in listBox2 and:
- Retrieves the element by name from the document
- Looks up the parameter by name via
LookupParameter() - Compares the current value to the new value — only updates if different
- Converts the input back to Revit internal units: metres → feet (
÷ 0.3048), degrees → radians (× π/180) - Writes the value and records the parameter name in the updated list
Transaction Committed — Success Dialog
After the loop completes, the transaction is committed. A success TaskDialog lists the names of all parameters that were actually updated. If no values differed (all were already at the target), the dialog reports "No parameters were updated."
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
| listBox1 is empty | No instances with SubcategorySolid or SubcategoryVoid parameter in the project | Ensure corridor/slab instances were created by AutoBRIDGE; these parameters are set on creation |
| Parameter grid is empty after transferring instances | All parameters of the selected instances are read-only or excluded | Check that the selected instances have at least one writable Double or String parameter not in the exclusion list |
| "[varies]" and cannot be set error on RUN | A row with [varies] was activated but the value was not changed | Type a new uniform value into the cell before running, or deactivate the row |
| Value doesn't change after RUN | The entered value was the same as the existing value | The tool skips identical values — confirm the new value differs from the current; check unit conversion (metres input, not mm) |
| Some instances not updated | Those instances don't have the parameter or it is read-only | Check that the parameter is an Instance parameter and not set to read-only by a formula in the family |
| Grid shows very long parameter list | Instances have many parameters | Normal — scroll through the grid; activate only the rows you need to change |