import and merge ifc

Good morning all

I am currently having problems importing IFC2X3 from civil 3D into blender,
I have this error message

i tried to change the applcation name in the code of the ifc file, badly it didn't work
if you have any other idea?
I have ifc's that come from multiple sources.
I must must assemble with you advice?
I intended to create a box on each ifc to have a reference object.

thanks in advance



  • This bug should've been fixed, see:

    However, for merging IFCs, I recommend using the IfcPatch MergeProject recipe instead of importing into a single file then exporting. That is the more correct way of doing it.

  • edited July 16

    and how is the procedure? on win10 :-(
    I open an IFC with BlenderBIM (2.93 and 210605)

    then I go to the IFC Merge Tab. Choose the MergeProject recipe.
    Input IFC is the path to IFC1
    Output IFC the path to the result IFC3 ? (or is it the IFC2 file in which IFC1 is merged?)
    Differently: open IFC1, IFC2 as Input, xx as output.. arguments : nothing
    Python: Traceback (most recent call last):
    File "C:\Users\alberts\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\bim\module\patch\", line 44, in execute
    File "C:\Users\alberts\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\", line 19, in execute
    File "C:\Users\alberts\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\blenderbim\libs\site\packages\ifcpatch\recipes\", line 12, in patch
    source =[0])
    IndexError: list index out of range

    location: :-1

    Where to find help? documentation?

  • edited July 17

    @lukas the usability and (completely non-existent) documentation around IfcPatch needs to be improved. Would really love help on this :)

    Merge effectively does IFC1 + IFC2 = IFC3. The Input IFC is the path to IFC1. In the arguments you specify a JSON encoded string path to IFC2 (e.g. ["/path/to/ifc2.ifc"]). Then the output IFC is the path to IFC3. The error you see is because it is looking for the IFC2 argument which doesn't exist.

  • Sorry for troubling you..
    I first open IFC1 with BlenderBIM-add-on. I type IFC1 in the Input Patch (select the file)
    Then I select the output file (some empty existing txt-file renamed as .ifc)
    And then comes the argument in json format.. (on win10?).. ["C:\users\lalberts\Desktop\IFC2.ifc"] did not work.
    json.decoder.JSONDecodeError: Invalid \escape on line1 column 5 (char 4) (that 's the \ for the win10 path?)
    so I replaced the "\" by "/" ... now something is running: bpy.context.scene.BIMKPatchProperties.ifc_pages_args= "[\"C:/Users/alberts/Desktop/IFC3.ifc\"]"
    but nothing is merged?
    now: bpy.context.scene.BIMKPatchProperties.ifc_pages_args=" [\"C://Users/alberts/Desktop/IFC3.ifc\"]"
    using ["C://Users/alberts/Desktop/IFC3.ifc"] gave an error: RuntTImeError: Instance #36 not found
    location: : -1
    going to lines 44, 19, 17, 46, 19, 46, 14, 196, 111, 99, 1498 and fails..

    win10 is a problem.. try my linux laptop later.

  • I'm not sure what BIMKPatchProperties are, nor ifc_pages_args. They do not seem to be part of the BlenderBIM Add-on. Are you perhaps writing your own script? Feel free to catch me online on the OSArch chat and let's screenshare.

  • edited July 20

    No, I am not able to code anything.. (this K is a typo mistake from my side..sorry)
    of course one does NOT see the merged process without opening the ifc3.ifc file :-) .. too bad.. so
    it worked once, but need to redo it.. seems I need to restart Blender between failed attempts..
    replacing \ by / , it should be ["C://path/to/IFC2.ifc"] in win10. (path without empty spaces in the name?)

  • Glad you got it working :) Yes, the file paths on Windows are always a bit annoying to deal with.

  • I merged a 'revit'.ifc with a 'dds-cad'.ifc. Seems like only BlenderBIM/IfcOpenShell can manage this.
    How can we gratify You to have started this here.. wonderful.
    Take care.. do not overwork yourself :-)

Sign In or Register to comment.