Retrieve Windows from IFC Exchange
In this tutorial, you will learn how to retrieve a list of windows from an IFC exchange. This process is particularly useful for design analysis, energy simulation, cost estimation, regulatory compliance, and more.
What is IFC Data Exchange?
Industry Foundation Classes (IFC) data exchange is a standardized method for sharing information between BIM software applications. The IFC format is open, neutral, and platform-independent, ensuring interoperability in the construction and architecture industries.
You will use the following queries in this tutorial:
Type | Operation | Description |
---|---|---|
Query | GetElementsByExchangeId | Retrieves a list of elements in an exchange by using the element ID. |
Note: We have a detailed tutorial on how to create an exchange using IFC filters. For further details, check out Create an Exchange Using IFC Filters.
Retrieve Windows from IFC Data Exchange
The following steps demonstrate how you can run the exchange query to retrieve a list of all the windows available in an IFC Exchange.
- Enter the following query in the Query Pane of the Data Exchange Explorer.
Query
query GetElementsByExchangeId($exchangeId: ID!, $elementFilter: ElementFilterInput, $elementPagination: PaginationInput) { exchange(exchangeId: $exchangeId) { id name elements(filter: $elementFilter, pagination: $elementPagination) { pagination { pageSize cursor } results { id name properties { results { name value } } } } } }
Show More - In the Query Variables pane, enter the value of the
exchangeId
. To know, how to obtain theexchangeId
, refer Navigate to Exchanges within a Folder.Assign
elementFilter
with the category of your choice. For this exercise, to filter IFC Windows we will assign filter as “property.name.IfcObject IfcClass==IfcWindow”.Note: Refer to the Advanced Filtering Capabilities page to see the list of supported filtering options.
Additionally, set the pagination limit to any required value. You can traverse to subsequent pages by setting the cursor to the value returned in
cursor
field in the responseQuery Variables
{ "exchangeId": "ZXhjfnlwdWFzY1NicWlIT0R1R0s4OUkwTHdfTDJDfjU1MmEzMGMzLTkxYWMtNDIwNC04NzJmLWM0MDc3ZjJkZDI1YQ", "elementFilter": { "query": "property.name.IfcObject.IfcClass==IfcWindow" }, "elementPagination": { "limit": 5, "cursor": "" } }
Show More - Click Play. The query will return a list of all IFC windows from an IFC exchange. These windows will be displayed along with their specific properties like name and value.
Response
{ "data": { "exchange": { "id": "ZXhjfnlwdWFzY1NicWlIT0R1R0s4OUkwTHdfTDJDfjU1MmEzMGMzLTkxYWMtNDIwNC04NzJmLWM0MDc3ZjJkZDI1YQ", "name": "Urban House_1500elem_2024", "elements": { "pagination": { "pageSize": 5, "cursor": "762066e6-871b-48e5-a5b6-3bf73827d90e" }, "results": [ { "id": "3BE66DFCD3EB82B5535095EE246FC93C30C24A28", "name": "Single-Glass 1:36\" x 84\":120799", "properties": { "results": [ { "name": "name", "value": "Single-Glass 1:36\" x 84\":120799" }, { "name": "IfcObject.ObjectType", "value": "Single-Glass 1:36\" x 84\"" }, { "name": "IfcElement.Tag", "value": "120799" }, { "name": "IfcObject.IfcClass", "value": "IfcWindow" }, { "name": "Pset_WindowCommon.IsExternal", "value": false }, { "name": "Pset_WindowCommon.Reference", "value": "36\" x 84\"" }, { "name": "Operation", "value": "INSERT" } ] } }, { "id": "5AC2E49805D458B0D02C11B15C4BBF0D98E76AF5", "name": "Single-Glass 1:36\" x 84\":51560", "properties": { "results": [ { "name": "name", "value": "Single-Glass 1:36\" x 84\":51560" }, { "name": "IfcObject.ObjectType", "value": "Single-Glass 1:36\" x 84\"" }, { "name": "IfcElement.Tag", "value": "51560" }, { "name": "IfcObject.IfcClass", "value": "IfcWindow" }, { "name": "Pset_WindowCommon.IsExternal", "value": false }, { "name": "Pset_WindowCommon.Reference", "value": "36\" x 84\"" }, { "name": "Operation", "value": "INSERT" } ] } }, { "id": "551792B4484EA8CD977F18A66A34D9C1E012E9B0", "name": "Single-Glass 1:36\" x 84\":55436", "properties": { "results": [ { "name": "name", "value": "Single-Glass 1:36\" x 84\":55436" }, { "name": "IfcObject.ObjectType", "value": "Single-Glass 1:36\" x 84\"" }, { "name": "IfcElement.Tag", "value": "55436" }, { "name": "IfcObject.IfcClass", "value": "IfcWindow" }, { "name": "Pset_WindowCommon.IsExternal", "value": false }, { "name": "Pset_WindowCommon.Reference", "value": "36\" x 84\"" }, { "name": "Operation", "value": "INSERT" } ] } } ] } } } }
Show More