mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
WIP allow partial editing of spatial container. See #1222.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from blenderbim.bim.ifc import IfcStore
|
||||
|
||||
|
||||
class Data:
|
||||
products = {}
|
||||
|
||||
@classmethod
|
||||
def load(cls, product_id):
|
||||
file = IfcStore.get_file()
|
||||
if not file:
|
||||
return
|
||||
product = file.by_id(product_id)
|
||||
element = product.ContainedInStructure[0].RelatingStructure if product.ContainedInStructure else None
|
||||
cls.products[product_id] = {
|
||||
"type": element.is_a() if element else None,
|
||||
"Name": element.Name if element else None,
|
||||
"id": int(element.id()) if element else None
|
||||
}
|
||||
Reference in New Issue
Block a user