Retrieve Fixed Windows of a Specific Type from IFC Exchange
In this tutorial, you will learn how to retrieve a list of windows of a specified type 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 Fixed windows of a Specific Type from IFC Data Exchange
The following steps demonstrate how you can run the exchange query to retrieve a list of IFC windows of a specific type (for example: Fixed:96” x 36”’) from all the windows 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 property of your choice. For this exercise, to filter IFC Windows of Fixed:96” x 36” type we will assign filter as “(property.name.IfcObject.IfcClass==IfcWindow) and (property.name.IfcObject.ObjectType==’Fixed:96” x 36”’)”.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) and (property.name.IfcObject.ObjectType=='Fixed:96\" x 36\"')" }, "elementPagination": { "limit": 5, "cursor": "" } }
Show More - Click Play. The query will return a list of IFC windows of
ObjectType==’Fixed:96" x 36"
from the 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": 2, "cursor": "" }, "results": [ { "id": "0E2C82ED5C10B950B2757FC4EF5E1D13BB907354", "name": "Fixed:96\" x 36\":712049", "properties": { "results": [ { "name": "name", "value": "Fixed:96\" x 36\":712049" }, { "name": "IfcObject.ObjectType", "value": "Fixed:96\" x 36\"" }, { "name": "IfcElement.Tag", "value": "712049" }, { "name": "IfcObject.IfcClass", "value": "IfcWindow" }, { "name": "Pset_WindowCommon.IsExternal", "value": true }, { "name": "Pset_WindowCommon.Reference", "value": "96\" x 36\"" }, { "name": "Operation", "value": "INSERT" } ] } }, { "id": "BB608E35911E28A06E6D4682DF3C38699E805294", "name": "Fixed:96\" x 36\":712080", "properties": { "results": [ { "name": "name", "value": "Fixed:96\" x 36\":712080" }, { "name": "Pset_WindowCommon.IsExternal", "value": false }, { "name": "Pset_WindowCommon.Reference", "value": "96\" x 36\"" }, { "name": "IfcObject.ObjectType", "value": "Fixed:96\" x 36\"" }, { "name": "IfcElement.Tag", "value": "712080" }, { "name": "IfcObject.IfcClass", "value": "IfcWindow" }, { "name": "Operation", "value": "INSERT" } ] } } ] } } } } }
Show More