diff --git a/src/blenderbim/blenderbim/bim/module/profile/data.py b/src/blenderbim/blenderbim/bim/module/profile/data.py index e0da6336c5..23c03c969a 100644 --- a/src/blenderbim/blenderbim/bim/module/profile/data.py +++ b/src/blenderbim/blenderbim/bim/module/profile/data.py @@ -41,7 +41,7 @@ class ProfileData: @classmethod def total_profiles(cls): - return len(tool.Ifc.get().by_type("IfcProfileDef")) + return len([p for p in tool.Ifc.get().by_type("IfcProfileDef") if p.ProfileName]) @classmethod def profile_classes(cls): diff --git a/src/blenderbim/blenderbim/bim/module/profile/operator.py b/src/blenderbim/blenderbim/bim/module/profile/operator.py index 3f89a867d9..6972837cc8 100644 --- a/src/blenderbim/blenderbim/bim/module/profile/operator.py +++ b/src/blenderbim/blenderbim/bim/module/profile/operator.py @@ -34,6 +34,8 @@ class LoadProfiles(bpy.types.Operator): props.profiles.clear() for profile in tool.Ifc.get().by_type("IfcProfileDef"): + if not profile.ProfileName: + continue new = props.profiles.add() new.ifc_definition_id = profile.id() new.name = profile.ProfileName or "Unnamed" diff --git a/src/blenderbim/blenderbim/bim/module/profile/ui.py b/src/blenderbim/blenderbim/bim/module/profile/ui.py index 36dbd35c83..1226be9f87 100644 --- a/src/blenderbim/blenderbim/bim/module/profile/ui.py +++ b/src/blenderbim/blenderbim/bim/module/profile/ui.py @@ -41,7 +41,7 @@ class BIM_PT_profiles(Panel): self.props = context.scene.BIMProfileProperties row = self.layout.row(align=True) - row.label(text="{} Profiles Found".format(ProfileData.data["total_profiles"]), icon="SNAP_GRID") + row.label(text=f"{ProfileData.data['total_profiles']} Named Profiles Found", icon="SNAP_GRID") if self.props.is_editing: row.operator("bim.disable_profile_editing_ui", text="", icon="CANCEL") else: