Dynamo Users Scotland
  • Home
  • Resources
  • Why We Are Here
  • News
  • BIM-Blog
  • Home
  • Resources
  • Why We Are Here
  • News
  • BIM-Blog
Search by typing & pressing enter

YOUR CART

All sorts of BIM Blogging

10/28/2025 0 Comments

A Lightweight Way to Log Revit Add‑In Usage with PyRevit Hooks

Full Tutorial

The full step‑by‑step guide — including folder setup, deployment, and Power BI visuals:

https://www.reope.com/bimagination/a-very-simple-data-logging-setup-for-revit-with-pyrevit

Why? 

Understanding how teams actually use Revit tools is one of the most valuable — and most overlooked — parts of BIM management.

Whether you’re tracking adoption, identifying training needs, or justifying investment in add‑ins, usage data builds a narrative  that model audits alone can’t.


Revit doesn’t expose this information directly, but PyRevit does. Specifically: the journal-command-exec.py hook, which fires every time a Revit command is executed.

With a tiny amount of Python, you can capture:
  • Who ran a command
  • Which Revit file they were in
  • Which add‑in or tool they used
  • When they used it

This creates a simple, reliable telemetry stream — no licensing cost, no complex deployment, and no performance impact.

Why BIM Managers Should Care

This kind of logging helps you answer questions that normally require guesswork:
  • Which tools are actually being used?
  • Which users rely on which add‑ins?
  • Where should training be focused?
  • Which tools justify renewal or expansion?
  • Are ISO 19650 workflows being followed?
  • Are naming tools, sheet generators, or parameter scripts being used consistently?

It’s a small automation with big organisational impact.

The Core PyRevit Hook

PyRevit exposes a special script location:

pyrevit_hooks/journal-command-exec.py

Any code placed here runs every time a Revit command executes.

Here’s the minimal version of the logging logic:

from pyrevit import EXEC_PARAMS
from datetime import datetime
import os

user = os.environ.get("USERNAME")
doc = __revit__.ActiveUIDocument.Document
cmd = EXEC_PARAMS.event_args.CommandId logline = f"{user} | {doc.Title} | {cmd} | {datetime.now()}"


From here, you can append logline to a text file, CSV, or network location.

That’s it — you now have Revit telemetry.

Where This Helps Most

1. Add‑in ROI Tracking

If you’re deploying tools across multiple teams, usage data helps justify renewals and identify which tools deliver value.

2. Training & Support

Usage patterns reveal:
  • who needs training
  • who is your “power user”
  • which tools are misunderstood or ignored

3. Workflow Compliance

If your organisation relies on:
  • naming tools
  • parameter scripts
  • sheet generators
  • model‑audit tools

…you can verify whether they’re actually being used.

4. Model Health Dashboards

Combine this with:
  • Revit journals
  • ACC issue data
  • Power BI
…and you get a complete picture of project behaviour.

A Simple Output Pipeline

Most teams do this:
  1. Log to a shared folder
  2. Pull the logs into Power BI
  3. Build dashboards showing usage by:
    • user
    • project
    • tool
    • time
It’s simple, fast, and effective.

0 Comments



Leave a Reply.

    Author

    Mark is a BIM Expert and qualified UK Architect.  He currently works with Reope building digital solutions for built environment.

    Archives

    July 2026
    January 2026
    October 2025
    September 2025
    March 2025
    December 2024
    February 2023
    May 2022
    September 2021

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.