IFC GUID Summary
The IFC specification uses an unique identifier for object instances that follows the universal unique identifier standard UUID with its implementation as a globally unique identifier GUID. The generated GUID is compressed for exchange purpose following a published compression function. The compressed GUID is called "IFC-GUID" here.
A Globally Unique Identifier (GUID) or Universal Unique Identifier (UUID) (as defined by ISO/IEC 11578:1996 Information technology -- Open Systems Interconnection -- Remote Procedure Call (RPC) specification and more recently in ITU-T Rec. X.667 | ISO/IEC 9834-8:2005) provides a way of uniquely identifying an object. GUID generation algorithms have been developed for most software development framework environments and methods exist within these frameworks for persistence.
For file-based data exchange, a methodology was devised to compress these GUIDs to conserve space when physically exchanging IFC models through various media. Given that each IFC object instance required a unique identifier containing a 128-bit number, a base 64 character encoding was devised as shown below:
IFC-GUID Base-64 character encoding mapping:
0 1 2 3 4 5 6 0123456789012345678901234567890123456789012345678901234567890123 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$
The resulting IFC-GUID is a fixed 22 character length string. Software implementations will need to use an algorithm that converts standard GUIDs to and from this encoding for compliance with the IFC specifications.
Note The compression of the GUID for IFC file based exchange had been introduced back in 1996 for version IFC1.0. At that time data files were still stored on floppy disks with 1,44 MB capacity where every byte counted. Today compression of a GUID would be considered unnecessary but due to backward compatibility issues it is still enforced.
IFC-GUID sample code and applets
Several algorithms in various languages have been made available to the IFC development community by their respective authors to use "as-is" and subject to the disclaimer terms cited below. No guarantees of suitability are provided by the IAI and all copyrights remain with their respective authors:
- C sample code based on the Microsoft CoCreateGuid() method written by Peter Muigg and Janos Maros can be downloaded here >>> IfcGuid-C Sample Code
- Update to C++ by Janos Maros >>> IfcGuid-C++ Sample Code
- Java sample code written by Jan Tulke and Eike Tauscher can be downloaded here >>> IfcGuid-Java Sample Code
- Java applet written by Jan Tulke and Eike Tauscher can be downloaded here >>> IfcGuid-Java Applet
- C# update to previous code by Jeremy Tammik conversion by Hakon Clausen [fixed by Tim Chipman] here >>>
- See the informative thread related to the development of this code here >>> http://thebuildingcoder.typepad.com/blog/2010/06/ifc-guid-algorithm-in-c.html
SOFTWARE PROVIDED IS "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS OR THE IAI (BUILDINGSMART) BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.