[How to] Create entity with ifcopenshell

edited March 2021 in General

I know there is a way to create an entity using:

file = ifcopenshell.open('/path/to/your/file.ifc')
obj = file.create_entity(name, **kwargs)

Is there another way to create this object without an ifc file that already exists?
That is, automatically create a class with IFC attributes that can become a super class of another python class.
pseudo-code:

entity = ifcopenshell.create_entity(name)
class MyClass(entity):
...

I looked through the documentation and codes on GitHub, but I couldn't find anything that could guide me.
I appreciate any help.
Thanks

Tagged:

Comments

Sign In or Register to comment.