mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
18 lines
504 B
Python
18 lines
504 B
Python
class Data:
|
|
products = {}
|
|
|
|
@classmethod
|
|
def purge(cls):
|
|
cls.products = {}
|
|
|
|
@classmethod
|
|
def load(cls, file, product_id):
|
|
if not file:
|
|
return
|
|
product = file.by_id(product_id)
|
|
cls.products[product_id] = {
|
|
"type": product.is_a(),
|
|
"PredefinedType": product.PredefinedType if hasattr(product, "PredefinedType") else None,
|
|
"ObjectType": product.ObjectType if hasattr(product, "ObjectType") else None
|
|
}
|