Archive a Revit PDF with embedded bim data
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'
bim-cli packages a Revit-exported PDF and a bim element JSON into a single PDF/A-3 compliant file — the drawing and its structured data in one offline archive, no account or cloud service required.
Prompt
Copy this into your AI coding tool:
I have a Revit-exported PDF and a JSON file containing bim element data. Package them into a single PDF/A-3 archive file.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 — package the PDF with bim element metadata: bim pdf package drawings.pdf elements.json
The output is drawings-out.pdf. It embeds elements.json as a PDF/A-3 associated file and also auto-generates marks.json (the marked-content tag index) and attaches it. The result is a self-contained archive: drawing + structured bim data in one file.
The command
bim pdf package drawings.pdf elements.json
{"ok":true,"result":{"attachments":["elements.json","marks.json"],"path":"drawings-out.pdf"}}
The command takes the PDF as the first positional argument and one or more JSON metadata files after it. The output file is <basename>-out.pdf written to %TEMP%\bim-cli\out\. Additional metadata files can be passed as further positional arguments.
If you need to read or respond to reviewer comments before archiving, see review PDF markups with your AI assistant.
marks.json is auto-generated: it contains the full marked-content tag index extracted from the PDF's content streams (the same data as bim pdf marked). Attaching it alongside your elements JSON means the archive is complete — any downstream tool can read both the structural data and the element positions without needing the original Revit model.
What the test harness checks
This scenario is verified end-to-end by the bim-cli test harness:
bim scenario run tests/scenarios/pdf-archive-pdfa3.yaml --strict
Why this exists
PDF/A-3 associated file attachments are the standard mechanism for embedding machine-readable metadata in a drawing PDF. In AEC, the use case is long-term archival: a deliverable package that contains both the visual drawing and its structured bim data without relying on a shared drive or project management system to keep them together.
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.