Blenderbim libraries

Good morning everyone,
I'm new to the use of blenderbim add-on. I'm creating a new object library, but when I import it into Blender and try to add a new object from that library, the program carries out this error:
I don't know how to solve this issue, are there anyone who has any idea to solve it? Thank you!

Comments

  • Could you share your object?

  • I am getting the same error, also when starting a new IfcProject and I try to add a IfcCivilElementType. I think it's a bug.

    I tried downloading the latest release here:

    https://github.com/IfcOpenShell/IfcOpenShell/releases

    However same error:

    Error: Python: Traceback (most recent call last):
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\module\model\workspace.py", line 394, in invoke
        return self.execute(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\tool\ifc.py", line 105, in execute
        IfcStore.execute_ifc_operator(self, context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\ifc.py", line 418, in execute_ifc_operator
        result = getattr(operator, "_execute")(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\module\model\workspace.py", line 385, in _execute
        getattr(self, f"hotkey_{self.hotkey}")()
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\module\model\workspace.py", line 407, in hotkey_S_A
        bpy.ops.bim.add_constr_type_instance()
      File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py", line 113, in __call__
        ret = _op_call(self.idname_py(), None, kw)
    RuntimeError: Error: Python: Traceback (most recent call last):
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\module\model\product.py", line 78, in execute
        return IfcStore.execute_ifc_operator(self, context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\ifc.py", line 418, in execute_ifc_operator
        result = getattr(operator, "_execute")(context)
      File "C:\Users\cclaus\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\blenderbim\bim\module\model\product.py", line 93, in _execute
        instance_class = ifcopenshell.util.type.get_applicable_entities(ifc_class, self.file.schema)[0]
    IndexError: list index out of range
    Location: C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\modules\bpy\ops.py:113
    

    It happens when I try to add a type instance from a IfcCivilElementType, don't understand why it happens :(, I tried removing the [0] after the line instance_class = ifcopenshell.util.type.get_applicable_entities(ifc_class, self.file.schema)[0]. But it threw a lot of other errors.

    Ace
  • I understand, thank you anyway for the helpfulness! I'm gonna try to find out other ways.

  • edited December 2022

    I've tried to assign a different class to the library's object and everything went well, so the previous issue was a bug for sure but there is still a problem when I want to modify that object.

  • created a PR here, that i think addresses the problem.
    Just an FYI, too, it looks like IfcCivilElement and IfcCivilElementType are deprecated in IFC4.3.0.0
    http://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcCivilElement.htm
    IFC4.3.0.0-DEPRECATION This entity is deprecated. Usage of a generic element for civil engineering works is no longer desirable with specific types now provided as subtypes of IfcBuiltElement, IfcEarthworksElement, IfcFacility and IfcGeotechnicalElement.

    CoenAceCadGiru
  • @theoryshaw is correct and his fix has now been merged. Thanks so much!

    The second error is because you've called it a beam and are using the BIM tool, which at the moment has some hardcoded assumptions about the make up of beams (e.g. that they are extruded profiles using parametric material profiles, as opposed to your rock). So it's not a bug until later when we polish up the BIM tool more.

  • edited July 2023

    I downloaded a manufacturer's Shower Screens (in IFC 2x3 format) from bimobject.com and was able to successfully upgrade it to IFC4 in BBIM. When I open it in a new IFC Project in BBIM I can see the object assigned correctly to its class IfcFurnishingElement. I am even able to parametrically change the width and height dimensions.

    But the problem is when I copy and paste it in the project I am working on the Object Metadata reads "IFC Element Not Found". I clicked the "Unlink Object" to be able to reassign the class but it doesn't still allow to assign a class to it.

    I have seen there are good IFC products and libraries online and it would be really nice to be able to use them in BBIM. Any help would be really appreciated.

  • Yeah, don't copy paste from one project to another. Copy pasting only copies and pastes Blender data, not IFC data. Use the Project Setup > Project Library to import types from one project to another.

    Currently there is no UI to import a non-type. Can you please report a bug? All the pieces are there to implement this, we just need to wire it up together.

  • @Moult said:
    Yeah, don't copy paste from one project to another. Copy pasting only copies and pastes Blender data, not IFC data. Use the Project Setup > Project Library to import types from one project to another.

    Yes, but the problem is when I use the Project Set > Project Library and I add it, the geometry doesn't come as the Shower Screen but as a box.

  • Correct because the furniture type itself has no geometry (which isn't very good in this scenario) so it defaults to a cube. If you file a bug we can track the feature to add the furniture (which has the geometry) not the type.

  • edited July 2023

    @Moult said:
    If you file a bug we can track the feature to add the furniture (which has the geometry) not the type.

    Thanks... so I guess on the GitHub page for BlenderBIM right?

  • @Owura_qu said:

    @Moult said:
    If you file a bug we can track the feature to add the furniture (which has the geometry) not the type.

    Thanks... so I guess on the GitHub page for BlenderBIM right?

    Hi, was your problem solved?
    I also have zero BBIM knowledge, I would like to add air-dock-leveller to a new IFC project, but I don’t know how to do it so that the properties aren’t lost. Could somebody please help.
    Thanks in advance.

  • @Roel said:
    Hi, was your problem solved?
    I also have zero BBIM knowledge, I would like to add air-dock-leveller to a new IFC project, but I don’t know how to do it so that the properties aren’t lost. Could somebody please help.
    Thanks in advance.

    If you download the ifc object (air-dock-leveller) you can load it, from your main project file, from the panel Project overview -> Project Setup -> Project Library. The ifc object schema must match the project schema (i.e. ifc4 -> ifc4). If the objects is a ifc2x3, you should click on upgrade to IFC4 in the pop-up browser (it will convert on-the-fly and create the same object in the same library folder with a "-ifc4" suffix). Then you can load this last object.

    Some objects show as a cube inside blender, but it can be that the Representations geometry is set to BoundingBox under Geometry and Materials panel. Sometimes you can activate another geometry representation in the context panel (i.e. I find sometimes a SurfaceModel representation that I can click and then the geometry appears). But sometimes there is no geometry.

    Sometime the object property set appears under the object instance, not under the type, but they should be there.

    theoryshawOwura_qu
  • edited November 2023

    Hi, was your problem solved?
    I also have zero BBIM knowledge, I would like to add air-dock-leveller to a new IFC project, but I don’t know how to do it so that the properties aren’t lost. Could somebody please help.

    I would encourage you to visit this GitHub page since @theoryshaw demonstrated examples (along with some videos) to solve import problems like the one you are facing.

    Roel
Sign In or Register to comment.