OSArch Community

How to delete Ifc object that has Global Id but no 3d geometry

  1. S

    I have one door in my BBIM Ifc file that has a global id but no 3d geomery. I can see it in my exported door schedule and from there I can see its global id. And it can be found with search but because it has no 3D representation I can't delete it.

    It can be found in BIMvision too (no 3d geometry there either).

    I tried from Quality and coordination tab Debug tool named "Search Active Drawing for Failing Elements" but there was nothing to be found with it.

    How can I get rid of it?

  1. M

    Can you find it in the outliner?

    You could also use 3-4 lines of code to do that

  1. S

    @Massimo

    You could also use 3-4 lines of code to do that

    like this?

    
    from ifcopenshell.api import root
    
    from bonsai import tool
    
    model = tool.Ifc.get()
    
    alien = model.by_id(insert GUID here)
    
    root.remove_product(model, product=alien)
    
  1. M

    @steverugi exactly!

  1. M

    I'd prefer not to use scripting for this. Can you share your IFC and file a bug? You should be able to delete it using the interface.

  1. S

    I tested the script and was able to remove it by its GUID. After that (maybe for some other reason than the script) there was an error which prevented saving the file. So I reverted to older version and after saving the file with new name I was able to delete this "invisible" door. I'll check the old file if I can reproduce this possible bug.

  1. A

    As Dion said, this indicates some other issue that needs to be addressed, as usually there is no way that IfcDoor is not loaded from IFC file.

    And note that if you edit IFC file using scripts, make sure to save it as IFC file directly from the script (ifc_file.write), NOT using Bonsai save - when you edit IFC file manually Bonsai Blender environment goes out of sync with IFC file and the consequences are unpredictable. Also make sure to use fresh Bonsai session (or just save in Bonsai) before using some script, to make sure there are no pending changes in Bonsai that would be applied on save

Login or Register to reply.