This converts the GUID from the IFC version to the .NET version.
This node is an adaptation of code at https://github.com/hakonhc/IfcGuid/blob/master/IfcGuid/IfcGuid.cs
I found some Python IFC schema reading code and adapted it for use in Dynamo. It took a bit of work and isn’t perfect yet, but basically it just takes a path to an IFC file, and a schema definition, and attempts to unpack the information from the IFC file into lists.
The original code was set up to search by dictionary method (which would be faster), but I kept hitting some errors because the schema defines more attributes than are typically defined by a Revit IFC export. I have output these attribute discrepancies in the ‘attribute read status output’. In the end I made some ‘long lists’ which could be queried in various ways.
So the outputs are:
- log – a log of the reading of the schema and the IFC file
- attribute read status – comparison between schema and actual attributes in the IFC file
- line Ids – the id of the line from the IFC text data
- IFC name – the name of the line from the IFC text data
- attributesFromSchema – the official attributes defined for that IFC name
- attribute values – values from the line, as searched by the attributesFromSchema
Here are the basic outputs:
As the main lists are all matched with the amount of lines in the IFC, you can then do filtering and other operations:
I was also looking at making a Dynamo to BimServer connector, possibly adapting this code: https://github.com/aothms/python-bimserver-client(but I didn’t do that yet 🙂
This node will be available in Bakery package, in the IFC group.
This node takes 3 inputs:
- View prefix for views you want to export to IFC
- Target directory for the IFC files
- Optional: IFC version, current default is IFC2x3
When the node is Run, it filters through the Revit views to find those with the specified prefix, then it exports them as individual IFC files to the target directory. You could combine this with Web Request node to enable periodic execution (ie. automatic batch export).
Full credit goes to those who put the framework of this together over on the forum (also see ‘Credits’ in image below).