Bulk-edit Revit parameters from the command line
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'iwr -useb https://bimcli.com/install.ps1?src=site -OutFile $env:TEMP\bim-install.ps1; powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\bim-install.ps1'
Most teams do this one of two ways: a per-seat add-in that needs Revit open and someone clicking through it, or a visual scripting environment that assumes you've built the graph yourself. This page is the third path: open the spreadsheet, ask your assistant to push it back into the model, walk away.
bim-cli reads and writes Revit element parameters from a terminal. bim revit param get reads them, bim revit param set writes them across any number of elements, with a dry run first and an undo record after. For logic no verb covers, bim revit exec runs C# against the Revit API.
How it works
bim revit param get reads parameters of elements by id; bim revit param set writes them. They share one row shape, {id, params: {name: value}}, so a read can be edited and piped straight back. Instance, type, shared and project parameters all work by their display name (or a BuiltInParameter name such as ALL_MODEL_MARK).
Revit must be installed and licensed; bim starts it, or attaches to the one you have open, through the bim-revit add-in. See headless revit for setup.
Read parameters
bim revit param get --id 352198
bim revit element-list --category OST_Doors | bim revit param get --name "Mark,Fire Rating"
Each row is {id, name, category, params: {name: value}, info: {name: {storage_type, display, read_only}}}. Values are Revit internal units (decimal feet, square feet, radians, element ids); info.display is Revit's own string in project units. Add --type-params to also read each element's type.
Write parameters
bim revit param set --id 352198 --name Mark --value D-01-REVISED
bim revit element-list --category OST_Doors --properties Mark,Comments > doors.json
bim revit param set --rows doors.json --only Comments --dry-run
bim revit param set --rows doors.json --only Comments > set.json
Edit the values in doors.json (or in Excel, below) between the first and second line. --dry-run makes every check and Set call in a rolled-back transaction and reports each row as it would be: old, new, Revit's display strings, changed, or an error with a kind and a hint (read-only, type-parameter, parameter-not-found, unit-string for "1200 mm"). Rows that cannot be set fail on their own and the rest are kept; values already equal are no-ops. The real run adds changes.modified (the element ids written) and an undo block.
ConvertTo-Json -Depth 5 -InputObject @((Get-Content set.json | ConvertFrom-Json).undo) | bim revit param set
A parameter found only on the element's type needs --type-params, because it changes every instance of that type. bim revit param-dump --category OST_Doors | bim revit param set --id 352230 --only Comments copies one door's values onto another.
Custom logic with exec
When the edit needs logic no verb has (match by Mark, compute a value, renumber sheets), bim revit exec runs C# against the live Revit API and returns JSON. Add --rollback to try a write and leave the model unchanged.
bim revit exec --no-transaction --code "return new FilteredElementCollector(doc).OfClass(typeof(Wall)).Count();"
bim revit exec --code "
var sheets = new FilteredElementCollector(doc)
.OfClass(typeof(ViewSheet))
.Cast<ViewSheet>()
.Where(s => s.SheetNumber.StartsWith(\"A\"))
.ToList();
using (var tx = new Transaction(doc, \"renumber\")) {
tx.Start();
foreach (var s in sheets)
s.SheetNumber = \"X\" + s.SheetNumber;
tx.Commit();
}
return sheets.Count;
"
{"ok":true,"data":34}
Schedules and parameter lists
Named schedules and per-category parameter lists have their own read verbs:
bim revit schedule-read --name "Door Schedule"
{"ok":true,"name":"Door Schedule","columns":["Mark","Type","Width","Height"],"rowCount":2,"rows":[{"Mark":"D-01","Type":"Single Flush","Width":"914","Height":"2134"},{"Mark":"D-02","Type":"Double Flush","Width":"1828","Height":"2134"}]}
bim revit param-dump --category OST_Doors
The Excel pipe
bim excel reads and writes spreadsheets, so an agent can export parameters, let you edit them in Excel, and write them back. The rows keep the element id, which is what param set matches on. More on import Excel into Revit, including sheets keyed by Mark.
bim revit element-list --category OST_Doors --properties Mark,Comments | bim excel write ./doors.xlsx
bim excel read doors.xlsx | bim revit param set --only Comments --dry-run
bim excel read doors.xlsx | bim revit param set --only Comments
bim revit schedule-read --name "Door Schedule" | bim excel write ./doors-schedule.xlsx
bim revit warnings-export | bim excel write ./audit.xlsx
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'iwr -useb https://bimcli.com/install.ps1?src=site -OutFile $env:TEMP\bim-install.ps1; powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\bim-install.ps1'
Then ask your assistant to run bim describe --json. See what the installer does.