mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 21:58:46 +00:00
improve naming of the new method
This commit is contained in:
committed by
Thomas Krijnen
parent
de67648f3e
commit
3d787338fb
@@ -174,9 +174,9 @@ class Usecase:
|
|||||||
self.psetqto = ifcopenshell.util.pset.get_template(self.file.schema)
|
self.psetqto = ifcopenshell.util.pset.get_template(self.file.schema)
|
||||||
self.pset_template = self.psetqto.get_by_name(self.settings["pset"].Name)
|
self.pset_template = self.psetqto.get_by_name(self.settings["pset"].Name)
|
||||||
|
|
||||||
def _has_property(self, prop) -> bool:
|
def _should_update_prop(self, prop) -> bool:
|
||||||
"""
|
"""
|
||||||
Checks if the property already exists
|
Checks if the given property should be changed
|
||||||
"""
|
"""
|
||||||
return prop.Name in self.settings["properties"]
|
return prop.Name in self.settings["properties"]
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ class Usecase:
|
|||||||
# just delete the property first? - vulevukusej
|
# just delete the property first? - vulevukusej
|
||||||
def update_existing_properties(self):
|
def update_existing_properties(self):
|
||||||
for prop in self.get_properties():
|
for prop in self.get_properties():
|
||||||
if not self._has_property(prop):
|
if not self._should_update_prop(prop):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if prop.is_a("IfcPropertyEnumeratedValue"):
|
if prop.is_a("IfcPropertyEnumeratedValue"):
|
||||||
|
|||||||
Reference in New Issue
Block a user