Ejemplo n.º 1
0
def ShowRevitScriptOutput(scriptOutputStream,
                          output,
                          pendingReadLineTask=None):
    outputLines, pendingReadLineTask = stream_io_util.ReadAvailableLines(
        scriptOutputStream, pendingReadLineTask)
    if outputLines.Any():
        for line in outputLines:
            output("\t" + "- " + line)
    return pendingReadLineTask
Ejemplo n.º 2
0
def ShowRevitProcessOutput(processOutputStream,
                           output,
                           pendingReadLineTask=None):
    outputLines, pendingReadLineTask = stream_io_util.ReadAvailableLines(
        processOutputStream, pendingReadLineTask)
    if outputLines.Any():
        for line in outputLines:
            if False:  # Change to True to see Revit standard output (non-script output)
                output("\t" + "- [ REVIT MESSAGE ] : " + line)
    return pendingReadLineTask
def ShowRevitProcessError(processErrorStream,
                          output,
                          pendingReadLineTask=None):
    outputLines, pendingReadLineTask = stream_io_util.ReadAvailableLines(
        processErrorStream, pendingReadLineTask)
    if outputLines.Any():
        for line in outputLines:
            if line.StartsWith(
                    "log4cplus:"
            ):  # ignore pesky log4cplus messages (an Autodesk thing?)
                pass
            else:
                output("\t" + "- [ REVIT ERROR MESSAGE ] : " + line)
    return pendingReadLineTask