Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
360 B
Python
Raw Normal View History

import ifcopenshell
class Usecase:
def __init__(self, file, settings=None):
self.file = file
self.settings = {"Name": "Unnamed"}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
return self.file.create_entity("IfcMaterial", **{"Name": self.settings["Name"] or "Unnamed"})