OSArch Community

[BlenderBIM] Export IFC using BlenderBIM, but only selected objects?

  1. B

    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)
    
  2. C

    Bump, I would also like to know.

  3. M

Login or Register to reply.