def executeTaskScript():
     success = False
     output()
     output("Task script operation started.")
     if path_util.HasFileExtension(
             scriptFilePath,
             script_util.DYNAMO_SCRIPT_FILE_EXTENSION):
         if revit_dynamo.IsDynamoRevitModuleLoaded():
             revit_dynamo.ExecuteDynamoScript(uiapp,
                                              scriptFilePath,
                                              showUI=False)
             success = True
         else:
             success = False
             output()
             output(revit_dynamo_error.
                    DYNAMO_REVIT_MODULE_NOT_FOUND_ERROR_MESSAGE)
     else:
         script_util.ExecuteScript(scriptFilePath)
         success = True
     if success:
         output()
         output("Task script operation completed.")
     else:
         output()
         output(
             "ERROR: An error occurred while executing the task script! Operation aborted."
         )
     return
 def executeTaskScript():
     output()
     output("Task script operation started.")
     script_util.ExecuteScript(scriptFilePath)
     output()
     output("Task script operation completed.")
     return
예제 #3
0
def ExecutePostProcessingScript(batchRvtConfig, output):
    aborted = False
    try:
        InitializeScriptUtil(batchRvtConfig)
        output()
        output("Post-processing script operation started.")
        script_util.ExecuteScript(batchRvtConfig.PostProcessingScriptFilePath)
        output()
        output("Post-processing script operation completed.")
    except Exception, e:
        output()
        output(
            "ERROR: An error occurred while executing the post-processing script! Operation aborted."
        )
        exception_util.LogOutputErrorDetails(e, output)
        aborted = True