IFC Schema Identifier

Hi,

Is there a straightforward way to identify an IFC file’s version (eg. ifc2x3 or ifc4)? I’ve tried the usual way to right click and access the file’s properties however, it doesn’t reflect. I only found a way through opening up an IFC file through an external Ifc Viewer software, then i’m able to know which version it is.

Thank you!

Hi Chu,

you should be able to open an Ifc file with a common text editor.
In case of ifczip file you have to extract it before.
The Ifc version is part of the header section.

BR
Marcus

1 Like

Using an IFC toolkit, you can automate it easily

import ifcopenshell
f = ifcopenshell.open("file.ifc")
print(f.wrapped_data.header.file_schema.toString())

Which will print something like

FILE_SCHEMA(('IFC2X3'))

And if you open the file in any text editor, it’s found close to the top of the file, in the header section:

ISO-10303-21;
HEADER;FILE_DESCRIPTION(('ViewDefinition [CoordinationView_V2.0, QuantityTakeOffAddOnView]','Option [Drawing Scale: 100.000000]','Option [Global Unique Identifiers (GUID): Keep existing]','Option [Elements to export: Visible elements (on all stories)]','Option [Partial Structure Display: Entire Model]','Option [IFC Domain: Custom]','Option [Structural Function: All Elements]','Option [Convert Grid elements: Off]','Option [Convert IFC Annotations and ARCHICAD 2D elements: Off]','Option [Convert 2D symbols of Doors and Windows: Off]','Option [Explode Composite and Complex Profile elements into parts: Off]','Option [Export geometries that Participates in Collision Detection only: Off]','Option [Multi-skin complex geometries: Complex profile]','Option [Elements in Solid Element Operations: BRep]','Option [Elements with junctions: BRep]','Option [Slabs with slanted edge(s): BRep]','Option [Use legacy geometric methods as in Coordination View 1.0: Off]','Option [IFC Site Geometry: As boundary representation (BRep)]','Option [IFC Site Location: At Project Origin]','Option [Curtain Wall export mode: Single Element]','Option [Railing export mode: Single Element]','Option [Stair export mode: Single Element]','Option [Properties To Export: All properties]','Option [Space containment: Off]','Option [Bounding Box: Off]','Option [Geometry to type objects: Off]','Option [Element Properties: Off]','Option [Property Type Element Parameter: Off]','Option [Quantity Type Element Parameter: Off]','Option [IFC Base Quantities: On]','Option [Window Door Lining and Panel Parameters: Off]','Option [IFC Space boundaries: Off]','Option [ARCHICAD Zone Categories as IFC Space classification data: On]','Option [Element Classifications: On]'),'2;1');
FILE_NAME('/Users/stefan/Models/file.ifc','2018-01-04T17:04:39',('Architect'),('Naam bureau'),'The EXPRESS Data Manager Version 5.02.0100.09 : 18 Aug 2016','IFC file generated by GRAPHISOFT ARCHICAD-64 21.0.0 INT FULL Macintosh version (IFC add-on version: 5010 INT FULL).','The authorising person');
FILE_SCHEMA(('IFC2X3'));
ENDSEC;
1 Like

Hi Marcus,

Got it on that, i’ve just tried.

Thanks for the help!

Hi StefkeB,

That’s interesting, will look into that.

Thanks for the help!

Adding on to the text editor solution: When the file is large, a text editor could struggle to load the file. If you can handle the command line, you may want to read only the header or up to the schema keyword, for example on a unix shell: grep -m 1 'FILE_SCHEMA'. Note that this assumes sufficient line breaks in the file which usually is the case but not strictly necessary.

1 Like