Import Excel into Revit
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 by opening an add-in, pointing it at a spreadsheet, and clicking through a mapping wizard. Or building a Dynamo graph. With bim-cli it is one pipe: read the spreadsheet, hand the rows to bim revit param set.
Read an Excel file and update parameters across any number of elements in a Revit model -- with a dry run first and an undo record after. No add-in UI, no Dynamo graph, no copy-paste.
The pipeline
Start from the elements themselves, so every row carries its Revit element id:
bim revit element-list --category OST_Doors --properties Mark,Comments | bim excel write ./doors.xlsx
edit the Comments column in doors.xlsx; keep the id column
bim excel read doors.xlsx | bim revit param set --only Comments --dry-run
bim excel read doors.xlsx | bim revit param set --only Comments > set.json
bim revit param set takes the spreadsheet rows as they come: an id column plus one column per parameter (the same shape element-list prints). --only Comments writes just that column and reports the rest as skipped, so the name and Mark columns are never touched by accident. Empty cells are skipped, not cleared.
--dry-run makes every check and every Set call inside a rolled-back transaction, so you see each row's old and new value and any row that would fail (read-only, wrong storage type, a unit string like "1200 mm") while the model stays unchanged. The real run reports the same rows, the ids it modified (changes.modified) and an undo block of the old values.
ConvertTo-Json -Depth 5 -InputObject @((Get-Content set.json | ConvertFrom-Json).undo) | bim revit param set
Values are Revit internal units, the raw values element-list and bim revit param get print: lengths in decimal feet (mm / 304.8), areas in square feet, angles in radians. Text, integer and Yes/No parameters take the value as written. A row that cannot be set fails on its own with a hint; the others are kept.
Example: update door hardware specifications
Your door list lives in Excel, exported with element-list as above. Column headers match Revit parameter names:
| id | Mark | Hardware Set | Fire Rating | Comments |
|---|---|---|---|---|
| 352198 | D-01 | HW-3 | 90 min | Confirmed |
| 352230 | D-02 | HW-1 | 60 min | Pending |
| 352264 | D-03 | HW-3 | 90 min | Confirmed |
bim excel read door-hardware.xlsx | bim revit param set --only "Hardware Set,Fire Rating,Comments" --dry-run
bim excel read door-hardware.xlsx | bim revit param set --only "Hardware Set,Fire Rating,Comments"
Each cell becomes one row in the reply: old, new, Revit's display strings, changed, or an error with a kind and a hint. Values already equal are no-ops. A parameter that lives on the door's type needs --type-params (it changes every door of that type).
To look at the current values first, bim revit param get --id 352198,352230 --name "Hardware Set,Fire Rating" reads them; its rows ({id, params}) pipe straight into bim revit param set too.
Spreadsheets keyed by Mark
param set matches rows by element id only. A sheet that identifies elements by Mark (a door schedule export, a hardware list from a consultant) needs the ids first: export element-list --category OST_Doors --properties Mark and look the ids up in Excel (XLOOKUP on Mark), or match by Mark in a short script with bim revit exec, below.
$rows = @(bim excel read params.xlsx | ConvertFrom-Json)
@{ rows = $rows } | ConvertTo-Json -Depth 4 -Compress | Set-Content rows.json -Encoding utf8
bim revit exec --file set-by-mark.cs --args-json "@rows.json" --rollback
bim revit exec runs set-by-mark.cs inside one Revit transaction with the rows as args; --rollback runs the whole write and then undoes it, so the counts come back and the model is left unchanged. Run it again without --rollback to keep the changes.
// set-by-mark.cs: args.rows is a list of { "Mark": "D-01", "<parameter name>": "<value>", ... }
var byMark = new FilteredElementCollector(doc)
.WhereElementIsNotElementType()
.Where(e => !string.IsNullOrEmpty(e.get_Parameter(BuiltInParameter.ALL_MODEL_MARK)?.AsString()))
.ToLookup(e => e.get_Parameter(BuiltInParameter.ALL_MODEL_MARK).AsString());
int updated = 0, skipped = 0;
var notFound = new List<string>();
foreach (var row in argList("rows").OfType<IDictionary<string, object>>())
{
var mark = row.TryGetValue("Mark", out var m) ? m?.ToString() : null;
if (mark == null || !byMark.Contains(mark)) { notFound.Add(mark ?? ""); continue; }
foreach (var el in byMark[mark])
foreach (var kv in row.Where(c => c.Key != "Mark"))
{
var p = el.LookupParameter(kv.Key);
var value = kv.Value?.ToString() ?? "";
var ok = p != null && !p.IsReadOnly &&
(p.StorageType == StorageType.String ? p.Set(value) : p.SetValueString(value));
if (ok) updated++; else skipped++;
}
}
return new { updated, skipped, notFound };
The script returns how many parameter writes it made (updated), how many it could not make (skipped), and any Marks it did not find (notFound). To export a schedule first, see export Revit schedule to Excel.
Agent use
An AI coding tool can run the full round-trip without you touching the terminal:
Update Revit element parameters from an Excel file using bim-cli.Step 1 -- install bim-cli if not already installed: 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'
Step 2 -- refresh PATH: pwsh: $env:Path += ";$env:LOCALAPPDATA\bim-cli"
Step 3 -- open Revit with the model you want to update.
Step 4 -- read the Excel file: bim excel read params.xlsx The rows need an "id" column with Revit element ids. If they are keyed by Mark instead, get the ids with: bim revit element-list --category OST_Doors --properties Mark
Step 5 -- dry-run the write and check every row's old/new value and errors: bim excel read params.xlsx | bim revit param set --only "Comments" --dry-run (--only names the columns to write.) Then run it again without --dry-run, save the reply, and keep its undo block: piping undo back into bim revit param set restores the old values.
Values are Revit internal units (lengths in decimal feet). Rows that cannot be set come back as row errors with a hint; the other rows are kept.
Install
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
Works on Revit 2024 through 2027. No admin rights. No add-in install wizard. The first bim revit command places the add-in in %APPDATA%\Autodesk\Revit\Addins\ and nothing leaves your machine.
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.