mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
New ifcopenshell.api.run syntax, and rename create_product to create_entity. See #1399.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import ifcopenshell.api.owner.update_owner_history as update_owner_history
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class Usecase:
|
||||
@@ -35,4 +35,4 @@ class Usecase:
|
||||
)
|
||||
)
|
||||
self.settings["product"].RepresentationMaps = maps
|
||||
update_owner_history.Usecase(self.file, {"element": self.settings["product"]}).execute()
|
||||
ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": self.settings["product"]})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.util.element
|
||||
import ifcopenshell.util.placement
|
||||
import ifcopenshell.api.owner.update_owner_history as update_owner_history
|
||||
|
||||
|
||||
class Usecase:
|
||||
@@ -47,7 +47,7 @@ class Usecase:
|
||||
ifcopenshell.util.element.remove_deep(self.file, old)
|
||||
self.settings["product"].ObjectPlacement = placement
|
||||
|
||||
update_owner_history.Usecase(self.file, {"element": self.settings["product"]}).execute()
|
||||
ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": self.settings["product"]})
|
||||
|
||||
for settings in dependent_objects:
|
||||
self.settings = settings
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ifcopenshell.api.geometry.remove_representation as remove_representation
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.util.element
|
||||
|
||||
|
||||
@@ -53,4 +53,4 @@ class Usecase:
|
||||
for item in mapped_representations:
|
||||
self.unassign_product_representation(item["product"], item["representation"])
|
||||
for representation in just_representations:
|
||||
remove_representation.Usecase(self.file, {"representation": representation}).execute()
|
||||
ifcopenshell.api.run("owner.remove_representation", self.file, **{"representation": representation})
|
||||
|
||||
Reference in New Issue
Block a user