GUID valid/invalid

Hi

I am currently dealing with a file where the IfcGuid is not ok from my point of view.
GUID #13 = k0el31CUlyR1pRyDyerMEG
GUID #54 = kWlNI3mgHyK1QDiBnEISNJ

1-6(EDITED).ifc (12.2 KB)

Are IfcGuid’s allowed to start with a ‘k’?
What is the regulation?

I found the following discussion in the forum which refers to this question.

Thanks

No, these are not valid globally unique IDs. If you convert these numbers from base 64 to base 2, you would end up with a number longer than 128 digits, hence greater than 2^128 and greater than any 128-bit number.

1 Like

A note that this is a recurring issue that the documentation is still not describing how GUIDs are generated correctly, leading to mis-generated GUIDs. It was agreed to stop using the base64 in a future IFC version, so hopefully that will resolve this issue that has been ongoing for a couple of years.

I found that this was easily dealt with since the code to create a valid GUID is standard everywhere and the functions to convert it to a valid IfcGuid and back again are open source. If you can convert quickly and easily between the two, it is easy to check validity. I can see the argument for IfcGuid in text file formats to save space but it is also true that they use more space in databases and are better stored as native GUIDs. As a consequence, it should be desirable to convert freely between the two and use the appropriate format for both files and databases?

This has now been fixed in IFC4.3: 8.21.2.2 IfcGloballyUniqueId - IFC4.3.1.0 Documentation

Unfortunately evidence shows that it was not easily dealt with. For example, Catia generates invalid GUIDs.