Automated Room-Based 3D View Generation and Speckle Integration for Revit Projects

Hello community,

I want to showcase a work in progress. The full picture is to create an automated workflow to keep the BIM-Based Digital Twin platform updated using Speckle. This part aims to:

  • Automatically divide the model using a room-based selection of elements.
  • Generate 3D views for these divisions.
  • Send these 3D views to Speckle to feed the Digital Twin app.

LINK TO THE POST ON LINKEDIN

Nonetheless, I felt it was worth showcasing because I was able to achieve this integration within my own plugin. Working in Revit2023 and Revit2024.

The music in the background is just a touch to share how fun it is to code with merengue :trumpet: :trumpet: :trumpet:.

Next steps →

  • Get the target stream from UI as input (or create a new one if does not exist);
  • Implement functionality to Publish All, instead of one by one;
  • Collect the speckle ids of uploaded branches and elements (This would allow to link the 3D object in the Digital Twin with other data);
  • Improve the plugin UI design and feedback to the user;

Thanks for any suggestion or comment!

8 Likes

Super cool!! :starstruck_spockle:

I can see this being something many others will want to do :smiley: Is this something you will release to the public in one way or another?

Have you already started working on the Digital Twin side of things, or will that be done later?

1 Like

Yes I plan to public this set of tools, inside Revit, but it will still take some work :sweat_smile:. I think I could really use feedback from other users applying this into their projects.

Regarding the part of the Digital Twin, is being developed as well. Using Unreal Engine I have already hack a bit the Speckle Plugin to get the parameters of the elements (Until now just in a Test project). I need to create the some Kind of Login or authentication, receive the updates into the Digital Twin platform as the Speckle Web App does and some other features, to only then implement it into the Digital Twin project…

I will try keep posting the advances regarding this project. I am really looking forward to see it working soon.

2 Likes

After a week of sharing the post of this work in progress, i wanted to share an update of the development.

UPDATES

  • [DONE] Get the target stream from UI as input (or create a new one if does not exist);
  • [DONE] Collect the speckle ids of uploaded branches and elements (This would allow to link the 3D object in the Digital Twin with other data);
  • [DONE] Mapping of existing Building in Digital Twin platform.

PROBLEMS

  • Implement functionality to Publish All → This throw exceptions, in the speckle transport class, somehow I must guarantee that one view finish to publish before send the next one.

THOUGHTS

  • This two completed tasks, bring more flexibility when publishing to speckle the project, allowing to select an existing stream or create a new one.
  • Using the Digital Twin credentials it is possible to also map the rooms and fractions in the project, so the branches in speckle would be named with the Digital Twin Ids (To easy future queries from Digital Twin app, to speckle server). Digital twin app still under development.
  • Speckle Ids, are being also referenced in the Digital Twin app so the 3D representation of the elements can be connected with other data sources.

NEX STEPS

  • Implement functionality to Publish All;
  • Identify if the divisions already exists in the selected branch;
  • What if? There is NO active speckle client;
  • Improve the plugin UI design and feedback to the user;

Thanks for any suggestion or comment!

1 Like

Development Update and Challenges: Revit Plugin & Digital Twin Integration

Summary

After several updates to the current solution, it’s time to share progress, challenges, and solutions encountered while developing the Revit Plugin and integrating 3D elements with the Digital Twin application.

Current Status of the Revit Plugin

The Revit Plugin has been partially completed with the following features:

  • One-Click View Publishing: All views can be published with a single click, improving workflow efficiency.
  • Comparison Between Existing Building and Project Data: The plugin allows for comparison between an existing building created on the server and the project information in Revit, enabling the creation or update of existing data.
  • Automatic Parameter Generation: The plugin automatically creates the required parameters used to build the element hierarchy for 3D view generation.

Challenges Faced

While connecting 3D information from Speckle and data from the Digital Twin server, some issues emerged:

  1. Definition ID vs. RevitInstance ID:

    • On click, retrieving the Speckle ID from the element and using it to reference the corresponding data in the Digital Twin server led to an important realization: the ID in the 3D element represents the “definition” rather than the actual RevitInstance.
    • Solution: As discussed in this topic, the approach was adapted. Now, the Digital Twin App’s unique ID is stored by the Revit Plugin as a parameter in each Revit element before sending it to the Speckle server. This effectively bridges the connection between the 3D element and its corresponding data.
  2. Parameter Parsing Issues in Unreal Plugin:

    • When attempting to find the Digital Twin ID from the parameters on click, only parameters in the “definition” were retrieved, leading to further exploration of how parameters are parsed in the Unreal plugin.
    • Discovery: The Unreal plugin HACK originally focused on parsing parameters into UDisplayValue elements, ignoring other use cases. This realization led to an improvement where parameters are now fully parsed into UInstance as well, allowing for proper retrieval of instance-specific data.
    • Outcome: A RevitInstance actor now holds an auxiliary UActorComponent created to store the parameters of the instance, successfully enabling access to the originally desired _id.

Next Steps

Revit Plugin Enhancements

  • Public Plugin for Room-Based 3D View Generation:
    • Plan to develop a public plugin that extends the current implementation (developed for the current employer) to enable room-based 3D view generation in Revit.

Unreal Engine Plugin Improvements

  • Finishing Hacks and Workflow Enhancements:
    • Continue refining the “hacks” implemented in the Unreal plugin.
    • Unreal to Speckle.

Thanks for any suggestion or comment!

1 Like