Task 3 – Navigate to Designs within a Project
By the end of this task, you will be able to:
- Fetch design files available in a project.
- Make sense of the options and fields in the documentation on the
aecDesignsByProject
query, the results, and versions.
You will use the following queries in this task:
Type | Operation | Description |
---|---|---|
Query | aecDesignsByProject | Retrieves all designs within a specific project. |
Step 1: Request for a list of Designs within a Project
The aecDesignsByProject query returns AECDesigns object. The AECDesigns
object contains a list of AEC Designs.
- In AEC Data Model Explorer, the query is populated by default in the Query Pane. You can also edit or update the query as per your requirement and run it.
Query
query GetDesignsByProject ($projectId: ID!) { aecDesignsByProject(projectId: $projectId ) { pagination { cursor } results{ name id alternativeRepresentations { fileUrn fileVersionUrn } } } }
Show More- In the Query Variables Pane, replace the value of the project ID obtained in task 2.
Query Variables
{ "projectId": "YWltcHJvan5iLjAzZjk4YjEzLWVjOTUtNDYxYi1iOTQ1LTc2NWY0OTYxNjVjMX5iLmYzYjU5OGYwLWJhZWItNGIwNi1hYmFmLTQxODlmZDJjZDIzNw" }
- Click Play. The list of designs available within that project is displayed in the response. Note down the Design IDs of one of the Revit models (this case .rvt file you want to work with). You will need these IDs for the remaining tasks. For this tutorial, we will use the ID of the item named “Snowdon Towers Sample Architectural.rvt”.
The response should be similar to the following code-block:
Response
{ "data": { "aecDesignsByProject": { "pagination": { "cursor": null }, "results": [ { "name": "056750-ABC-V1-ZZ-M3-A-0001-S1.rvt", "id": "YWVjZH5xcTdtR2JYNVV4NDNNVmJES3cwZGVuX0wyQ35zRzVQb1BNcVNtR1RXYV9DdmZMSnNn", "alternativeRepresentations": { "fileUrn": "urn:adsk.wipprod:dm.lineage:sG5PoPMqSmGTWa_CvfLJsg", "fileVersionUrn": "urn:adsk.wipprod:fs.file:vf.sG5PoPMqSmGTWa_CvfLJsg?version=5" } }, { "name": "R24_RVT-PM_Atlantic Station_DEMO.rvt", "id": "YWVjZH5xcTdtR2JYNVV4NDNNVmJES3cwZGVuX0wyQ35MNzBKcFJGLVJmcW5kU2VqZGU5TTdn", "alternativeRepresentations": { "fileUrn": "urn:adsk.wipprod:dm.lineage:L70JpRF-RfqndSejde9M7g", "fileVersionUrn": "urn:adsk.wipprod:fs.file:vf.L70JpRF-RfqndSejde9M7g?version=4" } }, { "name": "P50_Civic Center Federated New.rvt", "id": "YWVjZH5xcTdtR2JYNVV4NDNNVmJES3cwZGVuX0wyQ35TUUNEZ2JxcVRoV0dEN05wZHZZNmdn", "alternativeRepresentations": { "fileUrn": "urn:adsk.wipprod:dm.lineage:SQCDgbqqThWGD7NpdvY6gg", "fileVersionUrn": "urn:adsk.wipprod:fs.file:vf.SQCDgbqqThWGD7NpdvY6gg?version=2" } }, { "name": "Snowdon Towers Sample Architectural.rvt", "id": "YWVjZH5xcTdtR2JYNVV4NDNNVmJES3cwZGVuX0wyQ35iaEtKQV8zdFIxbW5LVTVVVTRjTkV3", "alternativeRepresentations": { "fileUrn": "urn:adsk.wipprod:dm.lineage:bhKJA_3tR1mnKU5UU4cNEw", "fileVersionUrn": "urn:adsk.wipprod:fs.file:vf.bhKJA_3tR1mnKU5UU4cNEw?version=5" } }, { "name": "PacificCenter_AY_Arch.rvt", "id": "YWVjZH5xcTdtR2JYNVV4NDNNVmJES3cwZGVuX0wyQ35wS093cUNNZVQ0V3FWMWRXeHAyeVZ3", "alternativeRepresentations": { "fileUrn": "urn:adsk.wipprod:dm.lineage:pKOwqCMeT4WqV1dWxp2yVw", "fileVersionUrn": "urn:adsk.wipprod:fs.file:vf.pKOwqCMeT4WqV1dWxp2yVw?version=1" } }, { "name": "P50_Civic Center Federated.rvt", "id": "YWVjZH5xcTdtR2JYNVV4NDNNVmJES3cwZGVuX0wyQ35yZEstaVpiZVI0YVpqTDFfdGNYazNn", "alternativeRepresentations": { "fileUrn": "urn:adsk.wipprod:dm.lineage:rdK-iZbeR4aZjL1_tcXk3g", "fileVersionUrn": "urn:adsk.wipprod:fs.file:vf.rdK-iZbeR4aZjL1_tcXk3g?version=1" } } } ] } } }
Show More
After working through the steps mentioned above, you should see a screen similar to the following image:
Step 2: To preview the Design model
- Enter the external id of the project ID obtained from the previous task 2.
- Enter the Version ID of the model. For example refer to the ID
urn:adsk.wipprod:dm.lineage:bhKJA_3tR1mnKU5UU4cNEw
as mentioned in the Revit modelSnowdon Towers Sample Architectural.rvt
.- Click Viewer to view the preview of the model.
- After working through the steps mentioned above, you should see a screen similar to the following image:
![]()