BlenderBIM, problems to export ifc

edited March 2020 in General

Gave blenderBIM a try.

I am on Debian Buster. I used snap to install blender and installed latest blenderBIM. Tried to export the blender cube to ifc. Attached the systeminfo and the blender file (remove txt.)

BTW: how to mark code?

hugo@Ahorn:~$ 
hugo@Ahorn:~$ /snap/bin/blender
Read prefs: /home/hugo/.config/blender/2.82/config/userpref.blend
/run/user/1000/snap.blender/gvfs/ non-existent directory
found bundled python: /snap/blender/37/2.82/python
Warning: property 'release_confirm' not found in keymap item 'OperatorProperties'
Read blend: /home/hugo/Desktop/blenderbim.blend
Traceback (most recent call last):
 File "/home/hugo/.config/blender/2.82/scripts/addons/blenderbim/operator.py", line 77, in execute
   ifc_exporter.export()
 File "/home/hugo/.config/blender/2.82/scripts/addons/blenderbim/export_ifc.py", line 1098, in export
   self.ifc_parser.parse()
 File "/home/hugo/.config/blender/2.82/scripts/addons/blenderbim/export_ifc.py", line 149, in parse
   self.libraries = self.get_libraries()
 File "/home/hugo/.config/blender/2.82/scripts/addons/blenderbim/export_ifc.py", line 707, in get_libraries
   for collection in self.project['raw'].children:
TypeError: 'NoneType' object is not subscriptable
location: <unknown location>:-1
location: <unknown location>:-1
Saved session recovery to '/tmp/quit.blend'
Blender quit
hugo@Ahorn:~$


«1

Comments

  • Hey @bernd ! By default BlenderBIM does not assume any spatial structures, (unlike FreeCAD, which has a feature that inserts default information when you don't specify it), so you will need to actually create a spatial structure first :)

    This might help: https://blenderbim.org/blenderbim-tutorial.html

  • Hello everybody
    
    I am French and new on this forum, I install your plug-in when I do the first tutorial everything goes well. 
    up to Ifc export where I also have an error message.
    
    I use Blender 2.8 on windows 10
    can you help me
    cordially
    
    


  • @Buttar - that is an odd error. Can you please check in the Scene Properties panel for the Building Information Modeling subpanel, and see what is the value of the Schema Directory property? It should be set to a folder, and inside that folder should be a template.ifc file. A fresh Blender file should have that value set correctly ...

    Buttar
  • Thank you for your prompt response
    I am part of a new file, I have the same error with the export.
    I am not administrator of the station (my computer of company). 
    I could not check in the addons folder if the temple .ifc file is present.
    
    


  • @Buttar - Blender needs to be able to access that folder, otherwise export will not work.

    Although your second attached error looks different. I'm not quite sure why you might trigger that problem. What timezone are you in? I'm in the Sydney timezone. Let me know a time when you are online and you can share your screen, and I can help debug.

  • thank you MOULT

    I will check with IT to verify access to the addons files, unfortunately it may take several days. if the percist problems I will contact you here


  • Hy, I have the same problem my IFC will not export.

    And this happens with all my .ifc. I am from Infrastructure and my .ifc are from Revit, Civil3D,...

    Can you help me?

    Kind regards,

    89jaka

  • And this message.

    Kind regards,

    89Jaka

  • @89jaka - the current version of the BlenderBIM Add-on does not yet support a direct IFC export from an imported IFC. This is because the export feature was built at a different time to the import feature, and they are slowly reconciling their differences so that Blender can round-trip IFCs.

    That particular problem is due to a non-existent spatial object. There is a manual workaround for this, requiring you to add an empty object in each spatial collection, with the same name as the collection. (See "Quick Project Setup" as an example, and then mimic that structure.

  • @Moult I am not able to export an ifc file imported from freecad, have tried mimicing the blenderbim structure too. what could be done. I am using blenderbim 210605 version.
    many thanks, arun

  • @Arv what error are you getting? If you just import an IFC, then press export again, it should "just work" as no changes were made. You will no need to mimic any structure.

  • @Moult there is no error, but no output also (in fact the export window doesnt appear). not sure what i am missing. have selected the object before trying the export to ifc.

  • @Arv ah, sorry for the misunderstanding - the BlenderBIM Add-on no longer works that way - it no longer looks for selected objects, nor does it create new files by default. I understand it's frustrating when things change, but we are still in alpha, unfortunately and that is the reality.

    Instead, when you import an IFC into the BlenderBIM Add-on, you are essentially creating a "Link" between your Blend file and your IFC file. Then, you can make changes in Blender, and when you've made your changes, press File->Export->IFC. You will not see any export dialog, because it is actually not exporting - it is simply saving your changes to your already linked IFC. You can see your linked IFC in the IFC Project panel. It will also save your Blend file in your process.

    This may change again in the future to try and make it more intuitive. But basically think of your work in Blender not as something imported or exported, but instead of an "IFC Editing Interface" - all your data is always in the IFC and never in the Blend file. To save your changes, use the "Export->IFC" instead of a Blender save.

  • @Moult didnt get this to work, after export to ifc, blenderbim addon stopped working. tried to reinstall again, getting error now., will also try on linux later.

  • @Arv that looks like a problem with the install. Try re-installing your BlenderBIM Add-on and check the contents of your Blender addons dir - in very old versions of the add-on, there were other contents in there that should be purged. Feel free to drop by the OSArch Live Chatroom during Sydney timezone and hopefully we can do a screenshare to further debug if it doesn't solve your problem.

  • Hello everyone, this thread is probably where my question fits best:
    When I open/import/link an IFC file that was generated by software that uses a left handed coordinate system rather than a right handed one, I selected everything, rotated around the x-axis and applied the rotation. Exporting back into the ifc file seems to start but does not go through.
    @Moult Your recommendation to import and directly export back, worked fine. The ifc file has about 518000 lines or 32 MB. How much time will an export take when everything was touched? Are there any benchmarks to go by? Btw, I am on blenderbim 210903.
    I am grateful for any ideas on this.
    Best wishes,
    wmi

  • @wmi try the offset object placements recipe in ifcpatch using an xyz of 0 and an angle rotation of your desired rotation. It should be very fast to patch.

  • So I forgot about exporting to ifc for half an hour and then it was done. Sorry to be so impatient. The result however does put me off: While everything looked fine in blender after being rotated, the ifc file contains distorted versions of all its entities now, as though they were all rotated around their individual x-axes. Any thoughts?

  • @Moult that was very prompt, thanks a lot. It does assume that the ifc model's general orientation is already correct which it is not. The whole needs to be rotated around its x-axis.

  • @wmi have you got some screenshots? Can you share a file in a bug report?





  • These pictures illustrate what I experienced earlier. When I just made these to show them to you, everything worked out as expected. As to an error report, there is none - as Blender did not crash. It just took its time. Maybe on my first try I did forget to apply the rotation (Ctrl+A/Rotation )to the model and that messed it up like in the last screen shot. All editing I did was selecting everything with "A" followed by "R", "X", "90" and "Enter". I would share the ifc with you (how?) but it seems a bit academic now that is has worked out fine.
    Thanks again,
    wmi

  • I am glad it worked out. Don't worry about sending the file, the upcoming test suites should start making operations like these much more robust. As for speed, the latest unreleased version (which uses IfcOpenShell v0.7.0) actually has a huge speed increase for these types of operations. A minimum of 35% faster is expected perhaps, and I've experienced nearly 20x faster operations in certain scenarios.

  • Hi people,
    I am having some issues exporting Ifc (especially interested in IfcJSON) from BlenderBIM.
    As I try to export to Ifc I press the button but no dialogue appears, basically nothing happens. I can only export to Ifc once just as I set up a new IfcProject in a fresh blender file. If a load an existing Ifc file I can't even do that first export.
    Did anyone have similar issues? I tried reinstalling the add-on but nothing changed, so I am looking for a fix, or guidance to help fix the problem.

  • @thunderbolt_132
    Also nothing shows up in the Sytem Console?

  • I do get the "Export finished in x seconds message" in the console if I export with minor changes. Seems that it does export it overwriting the same file that was imported. Any ideas how to get the ifcjson file out?

  • edited January 2022

    @thunderbolt_132 ah, it seems as though when I rebuilt the ability to save more "invisibly" to the active IFC project, I didn't consider saving to a different serialisation. It's a bug, and I will fix it. You can track the progress here: https://github.com/IfcOpenShell/IfcOpenShell/issues/1989

  • @Moult Awesome! It does say in the export that there is a possibility to save to Ifcjson, is there some kind of a workflow dealing with that or is it connected to this issue? I know it is experimental but I would like to play around with the json file if I manage to get it out.

  • @thunderbolt_132 if you want to try it out, you can start by importing a .ifc file, then in the scene properties, under the IFC Project panel, choose Export IFC (the button, not the file->export->ifc menu). Then you can choose a new filename which you have to specify ends in .ifcjson. After that, you'll get an error and you won't be able to save again, but at least it will export what you had before that point to the .ifcjson file you specified.

    When the bug is fixed you will be able to save after that.

  • Fixed. Note that IfcJSON is only supported for export, not import, and that's why we're running into this bug.

  • The button should be somewhere around here?

Sign In or Register to comment.