登录Revit Design Automation加载项

问题描述 投票:0回答:1

我想将诊断输出发送到默认的report.txt文件。

[在某些帖子中显示,异常以某种方式(自动或不自动)记录到此report.txt文件中。

此外,我在一些示例中看到人们使用日志记录System.Console.WriteLine()

我已经尝试过,但是仍然无法在报告文件中看到它。

您能告诉我,如何实现这一目标?我知道可以创建另一个日志文件并将其发送回结果,但我认为使用此现有的report.txt会更容易。

谢谢!

autodesk-forge revit-api autodesk-designautomation
1个回答
0
投票

使用Revit appbundles登录到Design Automation中确实可以使用SystemConsole.WriteLine完成。发送到标准输出的所有内容都将捕获到您的workitems report.txt中。例如。

以下代码:

System.Console.WriteLine("Hello World!");

将在report.txt中生成以下几行:

[04/23/2020 19:20:59] Hello World!
© www.soinside.com 2019 - 2024. All rights reserved.