在作业的 CoreEngineExecution 阶段发生意外错误

An unexpected error happened during phase CoreEngineExecution of job

我一直在开发 Inventor 插件。我一直在针对多个 STEP 程序集进行测试。 运行 针对我本地 Inventor 的插件适用于所有情况。 运行 我在 forge 平台上的插件在所有情况下都有效,但只有一个。它在 1:40 分钟后失败,因此没有超时。但是报告确实显示“Inventor Core Engine 核心控制台因超时而关闭”

我正在寻找有关如何解决上述报告错误和“在作业的 CoreEngineExecution 阶段发生意外错误”的提示

脚本摘录如下所示

[02/20/2021 23:38:14] Start Inventor Core Engine standard output dump. [02/20/2021 23:38:14] InventorCoreConsole.exe Information: 0 : InventorCoreConsole.exe: 25.0.18300.0 [02/20/2021 23:38:14] InventorCoreConsole.exe Information: 0 : Starting Inventor Server. [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Started Inventor Server 2021.1 (Build 251245000, 245) (25, 10, 24500, 0000) [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Loading plug-in: iLogic Plugin [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Activating plug-in: iLogic Plugin [02/20/2021 23:38:15] iLogic Plugin: initializing... [02/20/2021 23:38:15] InventorCoreConsole.exe Information: 0 : Opening document: T:\Aces\Jobs\xxxxxx\xxxxxx.stp Invisible mode: False [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Opened [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Getting Inventor plug-in. [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Plug-in: UnfoldAddin [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Activating plug-in: UnfoldAddin [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : : ipPlugin (1.0.0.0): initializing... [02/20/2021 23:38:31] InventorCoreConsole.exe Information: 0 : Executing 'Run' method on Automation object. [02/20/2021 23:39:51] Error: Inventor Core Engine Core Console is shut down due to timeout. [02/20/2021 23:39:51] End script phase. [02/20/2021 23:39:51] Error: An unexpected error happened during phase CoreEngineExecution of job. [02/20/2021 23:39:51] Job finished with result FailedExecution [02/20/2021 23:39:51] Job Status:

任何方向都将不胜感激

好的,通过消除过程(这花了很长时间),我已经在我的插件中隔离了导致这个问题的代码。下面的块遍历 scd 的面,这是一个 SheetMetalComponentDefinition。如果我取消注释“if (f.Geometry is Plane)”块,我会在 Forge 上收到错误消息(但不是针对本地发明家)

不幸的是,我不知道为什么会导致这个问题,但希望这会在将来对某人有所帮助

foreach (Face f in scd.SurfaceBodies[1].Faces)
        {
            double a = f.Evaluator.Area;
            //PROBLEM
            //if (f.Geometry is Plane)
            //{
            if (a >= maxArea - 0.001)
            {
                maxArea = a;
                maxFace2 = maxFace1;
                maxFace1 = f;
            }
            //}
        }

如果一个进程超过一分钟没有向命令行打印任何内容(以表明它仍然 运行 正常),它可能会关闭。

我认为您遇到的问题是访问 f.Geometry 可能会触发文档的完全加载,这需要一分多钟,这就是为什么如果您没有使用 HeartBeat 对象,则会超时 - 请参阅 https://forge.autodesk.com/blog/design-automation-inventor-vs-template