Revit View Range Metadata in Speckle Streams

I am a relatively new user of Speckle currently creating a crowd simulation application in Unity. I am using Speckle v1 to allow Revit users to have an integration with my application.

In the Revit project, there are certain meta data attributes that I would like to be able to access in my Unity program. The biggest one is the View Ranges associated with model views.

This tells a program how to divide a 3D model into 2D cross sections as shown below.

Is this kind of data included in streams currently from revit, and if so how can I access from Unity. It would be good to hear some opinions about how I could make this possible, or whether I’m missing something obvious.

My end goal is to be able to get the 2D floor plan views into my Unity application.

Thanks all!

Hey Jedd,

Welcome to the forum! What you are trying to do sounds very cool, and we’d love to see that done with Speckle, let me try to help you :slight_smile:

In the v1 Unity Connector, I’m afraid it’s not possible to access metadata associated with Speckle objects being received.

In the v2 Unity Connector it’s possible, the data is stored in a SpeckleData component attached the each received object. Although, from our current Revit connector it’s not currently possible to export Views… But adding support for that shouldn’t be complicated! I’ve just logged an issue in github and will let you know once it’s implemented: Revit: add support for views · Issue #274 · specklesystems/speckle-sharp · GitHub

Do you think you can do the switch to v2 or are you tied to v1? Any other questions in the meantime just ask!

P.S.
Feel free to Introduce yourself 🙆 if you feel like it!

Thanks for the reply!

I’ll take a look at the v2 Unity connector, there is a good chance that this will help solve some of my other problems thanks.

1 Like

Hey Jedd,

I’ve given it a quick go and added basic support for views, this should give you something to play with for the time being!

In Revit, you can send views by selecting the Project Info filter and then either 2D or 3D views (this change will be pushed in our next release, or you can build it yourself from master):

It might not be an ideal UI as it doesn’t let you select which views to send, but please give us your feedback/suggestions!

In Unity, I’ve added a very basic example of how to convert and then access the data of the views, currently they become GameObjects with a camera component and with the SpeckleData component as well:

For custom behavious, you should either edit the conversion routine or the onDataReceivedAction.

Hope it helps,
Looking forward seeing what you do with it! :slight_smile:

1 Like