带有CustomExporter插件的Revit Design Automation中的MissedMissingOutput错误

问题描述 投票:0回答:1

我正在尝试移植Revit插件以进行自动化设计,并继续遇到failedInstructions错误。似乎输出文件丢失:

[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:

当我在本地调试构建时(跟随this),输出文件位于插件运行末尾的沙箱文件夹中,因此我不确定自己做错了什么。

该插件基本上是一个CustomExporter,并在导出结束时创建一个二进制文件。我有可能将文件保存到错误的位置吗?我应该如何获取输出文件的保存位置?目前,这是我获取的方式:

string path = Path.GetDirectoryName(designAutomationData.FilePath);

我不确定这是否是最好的方法,但是当我在本地调试构建时,它确实可以工作。

谢谢!

autodesk-forge revit
1个回答
0
投票

[请检查您的活动配置,您可能具有如下所示的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"
}
© www.soinside.com 2019 - 2024. All rights reserved.