This repository was archived by the owner on Nov 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/ifcblenderexport/blenderbim/bim Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 operator .ValidateIfcFile ,
5050 operator .ExportIFC ,
5151 operator .ImportIFC ,
52+ operator .ProfileImportIFC ,
5253 operator .ColourByClass ,
5354 operator .ColourByAttribute ,
5455 operator .ColourByPset ,
Original file line number Diff line number Diff line change @@ -138,6 +138,19 @@ def execute(self, context):
138138 return {"FINISHED" }
139139
140140
141+ class ProfileImportIFC (bpy .types .Operator ):
142+ bl_idname = "bim.profile_import_ifc"
143+ bl_label = "Profile Import IFC"
144+
145+ def execute (self , context ):
146+ import cProfile
147+ import pstats
148+ cProfile .run (f"import bpy; bpy.ops.import_ifc.bim(filepath='{ bpy .context .scene .BIMProperties .ifc_file } ')" , "blender.prof" )
149+ p = pstats .Stats ("blender.prof" )
150+ p .sort_stats ("cumulative" ).print_stats (50 )
151+ return {"FINISHED" }
152+
153+
141154class SelectGlobalId (bpy .types .Operator ):
142155 bl_idname = "bim.select_global_id"
143156 bl_label = "Select GlobalId"
Original file line number Diff line number Diff line change @@ -2541,6 +2541,9 @@ def draw(self, context):
25412541 scene = context .scene
25422542 props = scene .BIMDebugProperties
25432543
2544+ row = layout .row ()
2545+ row .operator ("bim.profile_import_ifc" )
2546+
25442547 row = layout .row ()
25452548 row .prop (props , "step_id" , text = "" )
25462549 row = layout .row ()
You can’t perform that action at this time.
0 commit comments