工作项执行期间发生CorruptModelException

时间:2019-04-17 10:45:24

标签: autodesk-forge autodesk-designautomation

我对Forge设计自动化(V3 Beta)完全陌生

在设计自动化框架内执行工作项期间,会引发CorruptModelException。

所发送的模型(.rvt)将在桌面环境(R2018)中打开而不会出现问题。

我试图清除未使用并重新保存的文件,但这没有帮助。这是日志中说明问题的部分。

[04/17/2019 10:11:16] Found an addIn for registration: xxx.addin
[04/17/2019 10:11:16] Initializing RCE....
[04/17/2019 10:11:16] Initializing RevitCoreEngine (and possibly running stub installer)...
[04/17/2019 10:11:16] Language not specified, using English as default
[04/17/2019 10:11:18] Initialize and  get RCE: (VersionBuild) 18.0.0.0 (VersionNumber) 2018 (SubVersionNumber) 2018.3
[04/17/2019 10:11:18] Autodesk.Revit.Exceptions.CorruptModelException: The model could not be opened: Unspecified error
[04/17/2019 10:11:18]  (COleException 0x80004005)
[04/17/2019 10:11:18]    at Autodesk.Revit.ApplicationServices.Application.OpenDocumentFile(String fileName)
[04/17/2019 10:11:18]    at DesignAutomationFramework.DesignAutomationData..ctor(Application revitApp, String mainModelPath)
[04/17/2019 10:11:18]    at DesignAutomationFramework.DesignAutomationReadyEventArgs..ctor(Application revitApp, String mainModelPath)
[04/17/2019 10:11:18]    at DesignAutomationFramework.DesignAutomationBridge.SetDesignAutomationReady(Application revitApp, String mainModelPath)
[04/17/2019 10:11:18]    at RevitCoreEngineTest.RceConsoleApplication.Program.UserMain(CommandLineArgs cl)
[04/17/2019 10:11:22] RESULT: Failure - Result of running user app is failure
[04/17/2019 10:11:22] Finished running.  Process will return: TestError
[04/17/2019 10:11:22] ====== Revit finished running: revitcoreconsole ======
[04/17/2019 10:11:22] Process exit code: 4
[04/17/2019 10:11:22] End Revit Core Engine standard output dump.
[04/17/2019 10:11:22] Error: Application revitcoreconsole.exe exits with code 4 which indicates an error.
[04/17/2019 10:11:22] End script phase.
[04/17/2019 10:11:22] Error: An unexpected error happened during phase CoreEngineExecution of job.
[04/17/2019 10:11:22] Job finished with result FailedExecution

我要使用的一个示例文件可以在这里找到: https://www.dropbox.com/s/chffmh62wlmuwx7/empty.rvt?dl=0

有人可以测试一下,是否可以在Revit 2018设计自动化中使用它。

我对Workitem API也有些困惑。该文档说,我需要使用3条腿认证。 (这似乎很困难,因为它要求在请求中添加其他签名(?)...),但是分步指南将其显示为两足,这对我来说也行得通。这可能不是我遇到困难的原因。

有什么想法吗??

1 个答案:

答案 0 :(得分:2)

注释中提供的链接不是直接下载链接。如果单击链接,将带您到网页:

  

https://www.dropbox.com/s/chffmh62wlmuwx7/empty.rvt?dl=0

workitem输入参数需要直接下载链接,以便能够正确处理文件。例如,指向完全相同文件的直接下载链接是

  

https://dl.dropboxusercontent.com/s/chffmh62wlmuwx7/empty.rvt