[BlenderBIM] Export IFC using BlenderBIM, but only selected objects?
Hi,
I was looking at the code shown here:
"https://wiki.osarch.org/index.php?title=BlenderBIM_Add-on/BlenderBIM_Add-on_code_examples".
The below code (from the link above) is (I think) supposed to export an ifc but only the selected objects. I guess there has been updates since this example, I am atleast not able to make it work. Does anyone know how to export only the selected objects?
import bpy
import logging
import blenderbim.bim.export_ifc
import blenderbim.bim.qto
settings = blenderbim.bim.export_ifc.IfcExportSettings.factory(bpy.context, '/home/dion/testa.ifc', logging.getLogger('ExportIFC'))
qto_calculator = blenderbim.bim.qto.QtoCalculator()
ifc_parser = blenderbim.bim.export_ifc.IfcParser(settings, qto_calculator)
ifc_exporter = blenderbim.bim.export_ifc.IfcExporter(settings, ifc_parser)
ifc_exporter.export(bpy.context.selected_objects)
Comments
Bump, I would also like to know.
Yeah we don't export anymore, since we now work with IFC natively. What you're looking for is the ExtractElement patch recipe. You can find it in the Blender IFC Debug section: