diff --git a/ifc_tools.py b/ifc_tools.py index f905ab1..4662234 100644 --- a/ifc_tools.py +++ b/ifc_tools.py @@ -457,6 +457,8 @@ def add_properties( ifcentity = get_ifc_element(obj) if getattr(ifcentity, "Name", None): obj.Label = ifcentity.Name + elif getattr(obj, "IfcFilePath", ""): + obj.Label = os.path.splitext(os.path.basename(obj.IfcFilePath))[0] else: obj.Label = "_" + ifcentity.is_a() if isinstance(obj, FreeCAD.DocumentObject) and "Group" not in obj.PropertiesList: