Open Sourced: A Sample App to Generate a Changelog of Revit Elements

Earlier this year, we launched our very first open source project which serves as an example of how to leverage our Content Management API to validate Revit family parameters for Revit elements in your UNIFI Pro libraries. This week, we’re excited to announce that we’ve released our second open source sample application which demonstrates how to implement the Project Analytics API. Please click here for the full UNIFI API documentation.

What does the new application  do?

Project Analytics collects Revit data every time a user syncs with the central model, making it one of the few ways to review the “live” Revit model data without opening the Revit application itself. This tool is able to capture the data for each placed Revit element, including its parameter values, as of any given sync. Said differently, Project Analytics essentially creates a snapshot of the Revit model every time a user syncs.

What most users don’t realize is that these snapshots of the Revit model are stored in our database and available via the Project Analytics API. This sample application demonstrates how users have the ability to surface this valuable data using the API.

Please note that all users must have access to the Project Analytics API to use this application. If you have trouble logging in, talk to your company administrator or contact us.

Here’s a few of the many things you can do with the open source sample application:

#1: Review Historical BIM Data

The main feature of this sample application is to surface the Revit element parameter data as of each sync to central. End-users are given an intuitive interface to step through the data and browse model snapshots, placed Revit elements, and parameter data.

Revit Elements

1. Select a project from the Projects dropdown menu. If the selected project has models assigned, the Models dropdown menu appears and is populated with the models that are assigned to the selected project.

This action makes an API call to the /models endpoint to retrieve all models from the selected project.

2. Select a model from the Models dropdown menu to populate the Model Snapshots column with the snapshots (i.e., syncs to central) of the selected model.

This action makes an API call to the /models/{id}/commits endpoint to retrieve all commits for the selected model.

3. Select a snapshot (i.e., commit) to populate the Assets column with all of the assets (i.e., family instances) that were placed in the model at the time of the selected sync.

This action makes an API call to the /models/{id}/commmits/{eventId} endpoint to retrieve the data for that specific commit.

4. Select an asset from the Assets column to populate the Data grid to review the parameter values of that particular family instance.

This action does not make an API call because the data was previously collected from the /models/{id}/commits/{eventId} endpoint.

#2: Generate a Changelog for Revit Elements

In my previous life as a BIM manager, we had bounced around several ideas on how to track who was doing what in our models across our internal team or 3rd party consultants. We came up with more than a few time-consuming ideas such as having our staff add a narrative to a text file every day (i.e., a changelog). Of course, nobody had the time or energy to manually type up everything they were doing in their models, so that immediately compromised the accuracy of the changelog.

This sample application has the ability to automatically generate a changelog which compares any historical snapshot of the model to the current snapshot. In the current version, the application identifies Revit elements that were added or deleted from a Revit model. The Revit element ID is also included in the report (in square brackets) allowing users to track down the family instance within the Revit environment as well.

Note that this is just a small subset of the data that is collected at each sync. In addition to placed Revit elements, Project Analytics stores data such as project basepoints, sheets, drafting views, and more.

Revit Elements

Open Source on GitHub

These open source projects are available for the community’s contributions in any way. A few ideas that we had around additional features include finding changes to parameter values, checking for moved project base points, validating sheet naming conventions, and more. 

We’d love to hear your ideas as well. Please check out the repo on GitHub and let’s build something together!

Leave a Reply

Your email address will not be published.