mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Add support to override COBie types/components selection
This commit is contained in:
@@ -1334,8 +1334,12 @@ class ExecuteIfcCobie(bpy.types.Operator):
|
||||
fh.setFormatter(logging.Formatter('%(asctime)s : %(levelname)s : %(message)s'))
|
||||
logger = logging.getLogger('IFCtoCOBie')
|
||||
logger.addHandler(fh)
|
||||
parser = IfcCobieParser(logger)
|
||||
parser.parse(bpy.context.scene.BIMProperties.cobie_ifc_file)
|
||||
selector = ifcopenshell.util.selector.Selector()
|
||||
parser = IfcCobieParser(logger, selector)
|
||||
parser.parse(
|
||||
bpy.context.scene.BIMProperties.cobie_ifc_file,
|
||||
bpy.context.scene.BIMProperties.cobie_types,
|
||||
bpy.context.scene.BIMProperties.cobie_components)
|
||||
if self.file_format == 'xlsx':
|
||||
from cobie import CobieXlsWriter
|
||||
writer = CobieXlsWriter(parser, output)
|
||||
|
||||
@@ -1125,6 +1125,8 @@ class BIMProperties(PropertyGroup):
|
||||
features_file: EnumProperty(items=getFeaturesFiles, name="Features File", update=refreshScenarios)
|
||||
scenario: EnumProperty(items=getScenarios, name="Scenario")
|
||||
cobie_ifc_file: StringProperty(default='', name="COBie IFC File")
|
||||
cobie_types: StringProperty(default='.COBieType', name="COBie Types")
|
||||
cobie_components: StringProperty(default='.COBie', name="COBie Components")
|
||||
diff_json_file: StringProperty(default='', name="Diff JSON File")
|
||||
diff_old_file: StringProperty(default='', name="Diff Old IFC File")
|
||||
diff_new_file: StringProperty(default='', name="Diff New IFC File")
|
||||
|
||||
@@ -1586,6 +1586,11 @@ class BIM_PT_cobie(Panel):
|
||||
row.prop(props, "cobie_ifc_file")
|
||||
row.operator("bim.select_cobie_ifc_file", icon="FILE_FOLDER", text="")
|
||||
|
||||
row = layout.row()
|
||||
row.prop(props, "cobie_types")
|
||||
row = layout.row()
|
||||
row.prop(props, "cobie_components")
|
||||
|
||||
row = layout.row()
|
||||
op = row.operator('bim.execute_ifc_cobie', text='CSV')
|
||||
op.file_format = 'csv'
|
||||
|
||||
Reference in New Issue
Block a user