将可读的 GUID 转换为 IFC-GUID22 个字符长度的字符串-Python

问题描述

目前我得到一个 GUID 字符串(可读),但我需要 GUID 作为固定的 22 个字符长度的字符串。

我得到了什么:

'{0a820503-7dbf-4386-a8ec-9a312d6a81c2}'

我需要什么:

0AWWK3VRz3XgZicZ4jQe72

如何将接收到的字符串转换为 IFC 所需的 GUID?

https://technical.buildingsmart.org/resources/ifcimplementationguidance/ifc-guid/

enter image description here

感谢您的帮助

解决方法

找到关于转换 GUID 的解决方案

https://github.com/IfcOpenShell/IfcOpenShell/blob/master/src/ifcopenshell-python/ifcopenshell/guid.py#L56