如何解决如何解释来自 Forge Automation API 的此错误消息?
我正在尝试在自动化 API 中执行 iLogic 脚本。该模型并不小,所以我将它作为一个 24MB 的 zip 文件上传。这是我的活动的样子:
{
"commandLine": [
"$(engine.path)\\InventorCoreConsole.exe /i \"$(args[inputFile].path)\" /s \"$(args[iLogicVb].path)\""
],"parameters": {
"iLogicVb": {
"verb": "get","localName": "input.iLogicVb"
},"outputFile": {
"verb": "put","localName": "output.pdf"
},"inputFile": {
"verb": "get","zip": true
}
},"id": "<myidhere>","engine": "Autodesk.Inventor+2021","appbundles": [],"description": "Running iLogic Rule"
}
这就是我的工作项的样子:
{
"activityId": "<myidhere>","arguments": {
"outputFile": {
"verb": "put","localName": "output.pdf","url": "https://developer.api.autodesk.com/oss/v2/buckets/...","headers": {
"Content-type": "application/octet-stream","Authorization": "..."
}
},"inputFile": {
"verb": "get","pathInZip": "<assembly name>.iam","iLogicVb": {
"url": "https://developer.api.autodesk.com/oss/v2/buckets/...","verb": "get","localName": "input.iLogicVb","Authorization": "..."
}
}
}
}
iLogic 代码非常简单:
Trace.WriteLine ("Starting rules")
ObjectWidth = 4 ft
ObjectHeight = 7 ft
Trace.WriteLine ("Saving PDF")
oDoc.SaveAs("output.pdf",true)
Trace.WriteLine ("Done")
根据执行报告,zip文件下载并解压成功,但出现问题:
[07/29/2021 01:48:58] Starting work item 9b0e77a3f2d14d21b09d2eaee7652a81
[07/29/2021 01:48:58] Start download phase.
[07/29/2021 01:48:58] Start downloading input: verb - 'GET',url - 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/input.iLogicVb'
[07/29/2021 01:48:58] Start downloading input: verb - 'GET',url - 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/....zip'
[07/29/2021 01:48:58] '304' bytes have been written to T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\input.iLogicVb.
[07/29/2021 01:48:58] End downloading file from 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/input.iLogicVb'.
[07/29/2021 01:48:59] '24085650' bytes have been written to T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\zip_112.zip.
[07/29/2021 01:48:59] End downloading file from 'https://developer.api.autodesk.com/oss/v2/buckets/.../objects/....zip'.
[07/29/2021 01:49:00] T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\zip_112.zip has been unpacked to folder T:\Aces\Jobs\9b0e77a3f2d14d21b09d2eaee7652a81\unpack_folder_113.
[07/29/2021 01:49:00] End download phase successfully.
[07/29/2021 01:49:00] Start preparing script and command line parameters.
[07/29/2021 01:49:00] Error: The 'path2' is not defined.
[07/29/2021 01:49:00] Error: An unexpected error happened during phase CoreEngineExecution of job.
[07/29/2021 01:49:00] Job finished with result FailedExecution
而这个 The 'path2' is not defined
绝对是一个无法识别的神秘错误。什么可能导致它?也许有一个标志可以增加输出详细程度以查看更多信息?
解决方法
Activity 中的“inputFile”需要“localName”属性。将它设置为我的 zip 文件的实际名称解决了这个错误。尽管这并没有使消息变得不那么神秘。
,@thesame,感谢您的报告。我认为这是我们将修复的一个错误。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。