forked from pyrevitlabs/pyRevit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.cs
More file actions
28 lines (21 loc) · 1000 Bytes
/
Copy pathscript.cs
File metadata and controls
28 lines (21 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB;
using pyRevitLabs.PyRevit.Runtime.Shared;
namespace LogOutputTest {
// Verifies buffered Console output reaches the output window before the
// command returns. CLR command exceptions surface through a Revit dialog
// rather than the output window, so this engine has no traceback check.
public class LogOutputTest : IExternalCommand {
public ExecParams execParams;
public Result Execute(ExternalCommandData revit, ref string message, ElementSet elements) {
const int lineCount = 12;
// Rapid, un-delayed writes exercise the batched output path.
for (int num = 1; num <= lineCount; num++)
Console.WriteLine(string.Format("flush-test line {0} of {1}", num, lineCount));
Console.WriteLine(string.Format(
"PASS if lines 1..{0} above are all visible.", lineCount));
return Result.Succeeded;
}
}
}