【问题标题】:CorruptModelException during work item execution工作项执行期间的 CorruptModelException
【发布时间】:2019-09-07 14:15:53
【问题描述】:

我是 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 legged auth。 (这似乎非常困难,因为它需要在请求中添加额外的签名(?)......),但分步指南显示它是两条腿的,否则对我来说也可以。这可能不是我遇到困难的原因。

有什么想法吗...?

【问题讨论】:

  • 您能否确认 Revit 引擎版本是否与文件版本匹配(如您在本地测试的那样)?您能否添加有关工作项的更多详细信息,特别是输入文件的来源?如果问题仍然存在,您可以在 forge.help 电子邮件中分享有问题的文件吗?请不要发送任何机密信息,
  • Revit 两端均为 2018。以前我有 2018 主要版本,但现在我更新到 2018.3,我仍然得到相同的结果。甚至尝试过空白项目。我的文件存储在 Dropbox 中,下载阶段似乎工作正常。我也可以在这里分享空项目的链接。
  • 我注意到日志中的一个细节:End downloading file https://www.dropbox.com/s/chffmh62wlmuwx7/empty.rvt?dl=0. 194568 bytes have been written to T:\Aces\Jobs\a9d5838fcdba401ca083e1913199b336\empty.rvt. 它说它下载了不到 0.2MB。什么可能导致...
  • 确实从 Dropbox 下载/上传/上传到 Dropbox 可能很棘手,让我从这里尝试
  • 现在我尝试了 A360 Drive,结果几乎相同,使用共享链接:autode.sk/2VeaSii。是否有任何可靠的云文件源可供使用...我的意思是这样我就可以在设计自动化原型时避免使用 OSS API。

标签: autodesk-forge autodesk-designautomation


【解决方案1】:

cmets 中提供的链接不是直接下载链接。如果您单击该链接,它会将您带到一个网页:

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

工作项输入参数需要直接下载链接才能正确处理文件。例如,指向完全相同文件的直接下载链接是

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

【讨论】:

  • 是的,这似乎可以解决问题!虽然我不知道您实际上是从哪里获得直接链接的……它是 Dropbox 业务等功能吗……?或者您是否以某种方式监控网络流量等?
  • 请参阅有关“dl=1”的 Dropbox 文档:help.dropbox.com/desktop-web/force-download 请注意,最好使用最终的重定向链接。
猜你喜欢
  • 2017-10-30
  • 1970-01-01
  • 2020-04-24
  • 2012-02-17
  • 2019-02-02
  • 2014-04-18
  • 2013-10-09
  • 1970-01-01
  • 2014-07-12
相关资源
最近更新 更多