@@ -340,17 +340,20 @@ def ProcessRevitFiles(batchRvtConfig, supportedRevitFileList):
340
340
snapshotDataExportFolderPath = str .Empty
341
341
342
342
if batchRvtConfig .EnableDataExport :
343
- snapshotDataExportFolderPath = snapshot_data_util .GetSnapshotFolderPath (
343
+ try :
344
+ snapshotDataExportFolderPath = snapshot_data_util .GetSnapshotFolderPath (
344
345
batchRvtConfig .DataExportFolderPath ,
345
346
revitFilePath ,
346
347
isCloudModel ,
347
348
cloudProjectId ,
348
349
cloudModelId ,
349
350
batchRvtConfig .SessionStartTime
350
351
)
351
- path_util .CreateDirectory (snapshotDataExportFolderPath )
352
- snapshotDataExportFolderPaths .append (snapshotDataExportFolderPath )
353
-
352
+ path_util .CreateDirectory (snapshotDataExportFolderPath )
353
+ snapshotDataExportFolderPaths .append (snapshotDataExportFolderPath )
354
+ except Exception as ex :
355
+ Output ("Failed to write session data: " + str (ex ))
356
+
354
357
scriptData = ScriptDataUtil .ScriptData ()
355
358
scriptData .SessionId .SetValue (batchRvtConfig .SessionId )
356
359
scriptData .TaskScriptFilePath .SetValue (batchRvtConfig .ScriptFilePath )
@@ -448,16 +451,19 @@ def RunBatchRevitTasks(batchRvtConfig):
448
451
Output ("Revit Files for processing (" + str (supportedCount ) + "):" )
449
452
for supportedRevitFileInfo in supportedRevitFileList :
450
453
batch_rvt_monitor_util .ShowSupportedRevitFileInfo (supportedRevitFileInfo , Output )
451
-
452
- if batchRvtConfig .EnableDataExport :
453
- session_data_exporter .ExportSessionFilesData (
454
+
455
+ try :
456
+ if batchRvtConfig .EnableDataExport :
457
+ session_data_exporter .ExportSessionFilesData (
454
458
batchRvtConfig .SessionDataFolderPath ,
455
459
batchRvtConfig .SessionId ,
456
460
[
457
461
supportedRevitFileInfo .GetRevitFileInfo ().GetFullPath ()
458
462
for supportedRevitFileInfo in supportedRevitFileList
459
463
]
460
464
)
465
+ except Exception as ex :
466
+ Output ("Failed to write session data: " + str (ex ))
461
467
462
468
if not aborted :
463
469
Output ()
0 commit comments