GraphQL Query on Revit Model

Hi Everyone,

I’ve uploaded a Revit model onto a local deployment Speckle instance. I’m running a GraphQL query on http://127.0.0.1:8081/graphql and using the new syntax of querying with Projects and Models vs Streams and Commits.

Build Versions:

  • Revit : Revit2024

  • Revit Connector : 2.20.6

  • Node : 18.20.5

  • Objective: I’m trying to understand how the data of a Revit model is organised in Speckle so that I’ll be able to write a dynamic query on the model.

  • Issue:

image

From what I understood, the main model is the primary design option of the Revit model data being sent over to Speckle, as referenced from this post. It has a standard naming convention of “main

The Revit model is shown to be nested underneath, which in turn has the various Revit structural types such as “Doors” nested further under.

image

Clicking on “main” shows that there is a object array listed under children.

However, trying to query the children under the specific project and model gives me an empty output, as shown above. Only if I copy the specific id of the Revit model (nested layer), will I be able to query the data present in the Revit model.

I have 3 questions:

  1. The null output of the children query could be a wrong query on my part, since it shows that there is a children object array under “main”. Why is there a null output when I tried to query the children?
  2. How is the Revit data stored in Speckle? i.e The hierarchical relationships between the revit model and main model.
  3. How would I dynamically extract the object id with purely the project and model id’s of a given Revit model?

Thank you so much!