profile.copy_profile

Fixes issue duplicated profile missing it's psets.
This commit is contained in:
Andrej730
2024-09-07 11:09:47 +05:00
parent e224bfd19f
commit 33001e6c6d
5 changed files with 97 additions and 1 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ class Profile(bonsai.core.tool.Profile):
@classmethod
def duplicate_profile(cls, profile: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
new_profile = ifcopenshell.util.element.copy_deep(tool.Ifc.get(), profile)
new_profile = ifcopenshell.api.profile.copy_profile(tool.Ifc.get(), profile)
# In UI unnamed profiles are not available, so we don't handle them.
new_profile.ProfileName = profile.ProfileName + "_copy"
return new_profile