![](/img/trans.png)
[英]Autodesk Forge Design Automation - Inventor - failedInstructions (FailedMissingOutput)
[英]FailedMissingOutput error In Design Automation for Revit with a CustomExporter plugin
我正在嘗試將 Revit 插件移植到設計自動化並繼續遇到 failedInstructions 錯誤。 似乎缺少 output 文件:
[04/02/2020 23:29:05] Finished running. Process will return: Success
[04/02/2020 23:29:05] ====== Revit finished running: revitcoreconsole ======
[04/02/2020 23:29:06] End Revit Core Engine standard output dump.
[04/02/2020 23:29:06] End script phase.
[04/02/2020 23:29:06] Start upload phase.
[04/02/2020 23:29:06] Error: Non-optional output [result.avr] is missing.
[04/02/2020 23:29:06] Error: An unexpected error happened during phase Publishing of job.
[04/02/2020 23:29:06] Job finished with result FailedMissingOutput
[04/02/2020 23:29:06] Job Status:
當我在本地調試構建時(在此之后),output 文件位於插件運行結束時的沙箱文件夾中,所以我不確定我做錯了什么。
該插件基本上是一個 CustomExporter,並在導出結束時創建一個二進制文件。 是否有可能我將文件保存到錯誤的位置? 我應該如何獲取output文件應該保存的位置? 目前這是我獲取它的方式:
string path = Path.GetDirectoryName(designAutomationData.FilePath);
我不確定這是否是最好的方法,但當我在本地調試構建時它確實有效。
謝謝!
這是我在更改活動配置后得到的錯誤報告:
[04/16/2020 22:53:18] Job information:
"CommandLine":[
"$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[AppliedVR2].path)"
]
"Settings":{
"dasreportfailedlimits": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"f8cd8a94406446378d9264575d78ab87"
"ActivityId":"AppliedVR.AppliedVRActivity+test"
"Engine.Id":"Autodesk.Revit!30"
"Apps": [
"App.Id":"AppliedVR.AppliedVR2!5"
]
"BoundArguments":{
"rvtFile": {
"localName": "input.rvt",
"url": "https://developer.api.autodesk.com/Masked:UeVmt8Rd4DdQdOqq2M6OBzlRrIk="
},
"result": {
"localName": "result.avr",
"url": "https://developer.api.autodesk.com/Masked:lufOG0jY7w3wI4qgu2piEpfmJlE=",
"verb": "put"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Masked:UK/Z3b5X3xUWxXiH6C9r9i9UlRU=",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"v6Y3fgoTmhViA3mDVLmGAD0vKIHoist4\"},\"scope\":\"code:all data:write data:read bucket:create bucket:delete\",\"expires_in\":3223,\"client_id\":\"v6Y3fgoTmhViA3mDVLmGAD0vKIHoist4\"}"
},
"verb": "put"
}
}
"Quotas":{
"limitDownloads": 200,
"limitUploads": 200,
"limitDownloadSizeMB": 2000,
"limitUploadSizeMB": 2000,
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
[04/16/2020 22:53:18] Starting work item f8cd8a94406446378d9264575d78ab87
[04/16/2020 22:53:18] Start preparing AppPackage AppliedVR2.
[04/16/2020 22:53:18] Download bits and install app to local cache.
[04/16/2020 22:53:18] Start download phase.
[04/16/2020 22:53:18] Start downloading file https://developer.api.autodesk.com/oss/v2/signedresources/bd22a42a-e4c6-46a3-a883-725fde437534?region=US.
[04/16/2020 22:53:19] End downloading file https://developer.api.autodesk.com/oss/v2/signedresources/bd22a42a-e4c6-46a3-a883-725fde437534?region=US. 17813504 bytes have been written to T:\Aces\Jobs\f8cd8a94406446378d9264575d78ab87\input.rvt.
[04/16/2020 22:53:19] End download phase.
[04/16/2020 22:53:19] Start preparing script and command line parameters.
[04/16/2020 22:53:19] Command line: [ /i T:\Aces\Jobs\f8cd8a94406446378d9264575d78ab87\input.rvt /al T:\Aces\Applications\de0b7681c6a14291e1f8079b595309bf.AppliedVR.AppliedVR2[5].package]
[04/16/2020 22:53:19] End preparing script and command line parameters.
[04/16/2020 22:53:19] Start script phase.
[04/16/2020 22:53:19] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_f8cd8a94406446378d9264575d78ab87 "T:\Aces\Jobs\f8cd8a94406446378d9264575d78ab87\userdata" /exe "T:\Aces\AcesRoot\20.0\coreEngine\Exe\revitcoreconsole.exe" /i T:\Aces\Jobs\f8cd8a94406446378d9264575d78ab87\input.rvt /al T:\Aces\Applications\de0b7681c6a14291e1f8079b595309bf.AppliedVR.AppliedVR2[5].package.
[04/16/2020 22:53:19] Start Revit Core Engine standard output dump.
[04/16/2020 22:53:19] Running in unattended mode.
[04/16/2020 22:53:19] ====== Revit is running: revitcoreconsole ======
[04/16/2020 22:53:19] Current Exe path: T:\Aces\AcesRoot\20.0\coreEngine\Exe\revitcoreconsole.exe
[04/16/2020 22:53:19] Echoing command line args:
[04/16/2020 22:53:19] 0:/i
[04/16/2020 22:53:19] 1:T:\Aces\Jobs\f8cd8a94406446378d9264575d78ab87\input.rvt
[04/16/2020 22:53:19] 2:/al
[04/16/2020 22:53:19] 3:T:\Aces\Applications\de0b7681c6a14291e1f8079b595309bf.AppliedVR.AppliedVR2[5].package
[04/16/2020 22:53:19] 4:/isolate
[04/16/2020 22:53:19] 5:HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_f8cd8a94406446378d9264575d78ab87
[04/16/2020 22:53:19] 6:T:\Aces\Jobs\f8cd8a94406446378d9264575d78ab87\userdata
[04/16/2020 22:53:19] Running RevitAssemblyResolver....
[04/16/2020 22:53:19] Initializing RevitCoreEngine...
[04/16/2020 22:53:19] Selected Revit\RCE install Path: (from app.config) C:\Revit2020
[04/16/2020 22:53:19] Resolving location of Revit/RevitCoreEngine installation...
[04/16/2020 22:53:19] Running user application....
[04/16/2020 22:53:22] Found an addIn for registration: AppliedVR.addin
[04/16/2020 22:53:22] Initializing RCE....
[04/16/2020 22:53:22] Initializing RevitCoreEngine (and possibly running stub installer)...
[04/16/2020 22:53:22] Language not specified, using English as default
[04/16/2020 22:53:27] Initialize and get RCE: (VersionBuild) 20.0.0.0 (VersionNumber) 2020 (SubVersionNumber) 2020.2
[04/16/2020 22:53:41] entering finishPlayback .. destroy m_PlaybackState
continuing finishPlayback .. destroy callStream()
exited finishPlayback
[04/16/2020 22:53:41] Finished running. Process will return: Success
[04/16/2020 22:53:41] ====== Revit finished running: revitcoreconsole ======
[04/16/2020 22:53:42] End Revit Core Engine standard output dump.
[04/16/2020 22:53:42] End script phase.
[04/16/2020 22:53:42] Start upload phase.
[04/16/2020 22:53:42] Error: Non-optional output [result.avr] is missing.
[04/16/2020 22:53:42] Error: An unexpected error happened during phase Publishing of job.
[04/16/2020 22:53:42] Job finished with result FailedMissingOutput
[04/16/2020 22:53:42] Job Status:
{
"status": "failedInstructions",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/AppliedVR/f8cd8a94406446378d9264575d78ab87/report.txt?AWSAccessKeyId=ASIATGVJZKM3BQBZQA5I&Expires=1587091998&x-amz-security-token=IQoJb3JpZ2luX2VjEJb%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJIMEYCIQC23btvW9Bcu1gNDXkzViJLprertbj9c7kxAy5PVJYRCwIhAPKWSZ3ZhMrrHdzJbBalII31HqBK28QVadpYVMf2P20RKt4BCK%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQARoMMjIwNDczMTUyMzEwIgy%2BO%2FAfOqk4DDr6iwIqsgG02AGNCa1FQ%2BdgFHLnhUGDdfEUS08GOiKhro71OlQ2SWFdklwJqB0CaZFqX5vRv8wrjuBwOY0j3h7lGisYWq1H95I3344cq3pARmaSnUUE2mEo3ccILj2uk3Lr3qrNvYTJxGgISNIn4c5yQ%2BocMDaSLVLpPSCsnP4zvkS8AxXWHS48WTTv6cLKqCBfL%2BxVga%2FM9nQ4NpwXfAKqNHvf5Ied5chHqAEUJqLWr6GgCpL%2F92AXMNif4%2FQFOt8B4Z7oymqrWokYXRjZ3d%2FHlZ17UXKA66w9ZZOdKl0%2BELpGn0DQE4nnRhdMFPpF4RNH4shTzMphSzxltjAmN%2BQCStFivM5u6HQMf0mHNGAx8lQUFX9Av2lJ%2BcD67GSNZjcW%2FeNvUG6huf2nhUTflYCGKMAkS%2FKhoxmALcaIGQc9u85%2FufPH7rzr%2FvrILpfFEqI6ThhluwegL0lsx9jZyXRkUCkTT9W8A5GaFI2%2BPgAoHrQRU%2FAwTfb%2BeCHoF3a0%2FG%2BqnIOTG1TFpmaeDIwqGnQpfF347YnE3Cto%2Bcjv2xUbcA%3D%3D&Signature=P%2B2FgQufC2CAXzd1v4P8VBy%2B82E%3D",
"stats": {
"timeQueued": "2020-04-16T22:53:17.8599944Z",
"timeDownloadStarted": "2020-04-16T22:53:18.3570171Z",
"timeInstructionsStarted": "2020-04-16T22:53:19.2091954Z",
"timeInstructionsEnded": "2020-04-16T22:53:42.9536344Z",
"timeUploadEnded": "2020-04-16T22:53:42.9540772Z",
"bytesDownloaded": 17813504
},
"id": "f8cd8a94406446378d9264575d78ab87"
}
請檢查您的活動配置,您可能有一個required: true
參數,如下所示。 因此,要修復它,您必須將其更改為required: false
,這里是修改現有活動配置的教程: https://forge.autodesk.com/en/docs/design-automation/v3/tutorials/revit/ step5-publish-activity/#step-3-update-an-existing-activity
{
"commandLine": [
"$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[DeleteWallsApp].path)"
],
"parameters": {
"rvtFile": {
"verb": "get",
"zip":false,
"ondemand":false,
"description": "Input Revit model",
"required": true,
"localName": "input.rvt"
},
"result": {
"verb": "put",
"description": "Results",
"required": true, //!<<< Here is the issue
"localName": "result.avr"
}
},
"engine": "Autodesk.Revit+2018",
"appbundles": [
"YOUR_NICKNAME.DeleteWallsApp+test"
],
"description": "Delete walls from Revit file.",
"version": 1,
"id": "YOUR_NICKNAME.DeleteWallsActivity"
}
更新
反映在您的活動主體上:
{
"commandLine": [
"$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[AppliedVR2].path)"
],
"parameters": {
"rvtFile": {
"localName": "input.rvt",
"url": "https://developer.api.autodesk.com/Masked:UeVmt8Rd4DdQdOqq2M6OBzlRrIk="
},
"result": {
"localName": "result.avr",
"url": "https://developer.api.autodesk.com/Masked:lufOG0jY7w3wI4qgu2piEpfmJlE=",
"required": false, //!<<< Add this line if there is no result.avr produced after task completed
"verb": "put"
}
},
"engine": "Autodesk.Revit+2020",
"appbundles": [
"AppliedVR.AppliedVR2"
],
"description": "YOU_COMMENTS_HERE",
"version": 5,
"id": "AppliedVR.AppliedVRActivity+test"
}
好的,我做了更多的實驗,並解決了這個問題。 我在后台線程上執行了一些操作,但沒有一個與 Revit API 交互。 當我在本地運行插件時它們工作正常,但我假設我不能在 Forge 上使用后台線程。 我本來希望這會在日志中顯示為錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.