简体   繁体   中英

Get IFC schema version

Opening an *.ifc file we can find "File_Schema" in the Header, for example: HEADER; ... FILE_SCHEMA (('IFC4')); ENDSEC;

We are downloading IFC stream file and it would be nice to know the file schema version for it. Is it somehow possible to get this information via DataManagement API?

This is already an old post, but just to mention that for those who download the file before any other operation: once downloaded, the following command can be used (on a Unix-like environment) to get exactly the IFC schema (eg "IFC2X3", "IFC4"):

grep "^FILE_SCHEMA" file.ifc | cut -d"'" -f2

Of course this command can be integrated in a program written in Node.js for example (using childProcess.exec), or any other programming language. Note that this is usually faster than streaming the file and searching in it, or even using a language-specific library to "grep" the file, especially for big IFC files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM