MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_property_unit

Function get_property_unit

src/ifcfm/ifcfm/cobie24.py:1095–1100  ·  view source on GitHub ↗
(pset: ifcopenshell.entity_instance, prop_name: str)

Source from the content-addressed store, hash-verified

1093
1094
1095def get_property_unit(pset: ifcopenshell.entity_instance, prop_name: str) -> Union[str, None]:
1096 for prop in getattr(pset, "HasProperties", []) or []:
1097 if prop.Name == prop_name:
1098 unit = getattr(prop, "Unit", None)
1099 if unit:
1100 return get_unit_name(unit)
1101
1102
1103# TODO: never used?

Callers 2

get_attributesFunction · 0.70
get_job_dataFunction · 0.70

Calls 1

get_unit_nameFunction · 0.70

Tested by

no test coverage detected