无效开关 [$(args[rvtFile].path)]。扩展为路径的变量必须加引号

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

Autodesk Forge 团队,您好,

我对创建活动有疑问,需要设计自动化方面的帮助。这是我试图通过提取房间数据的活动来实现的主体,但命令行有一些错误。我不知道我面临的提取问题是什么。我猜它有来自服务器的一些更新,但不知道如何修改更新来解决这个问题。

这是正文输入:

{
    "id": "{{activityName}}",
    "commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[{{appBudleName}}].path)" ],
    "parameters": {
      "rvtFile": {
        "zip": false,
        "ondemand": false,
        "verb": "get",
        "description": "Input Revit model",
        "required": true
      },
      "result": {
        "zip": false,
        "ondemand": false,
        "verb": "put",
        "description": "Results",
        "required": true,
        "localName": "result.rvt"
      }
    },
    "engine": "Autodesk.Revit+2022",
    "appbundles": [ "{{dasNickName}}.{{appBudleName}}+{{appBundleAlias}}" ],
    "description": "Extract Room from Revit file."
}

输出问题:

{
    "commandLine": [
        "Invalid switch [$(args[rvtFile].path)]. Variables that expand to paths must be quoted.Invalid switch [$(appbundles[RoomExtractor2].path)]. Variables that expand to paths must be quoted. (Parameter 'commandLine')"
    ]
}

任何帮助表示赞赏!

autodesk-forge
1个回答
0
投票

正如本博文中提到的,您必须将

path
变量放在引号内: https://aps.autodesk.com/blog/design-automation-command-line

例如

{
  "commandLine": [
    "$(engine.path)\InventorCoreConsole.exe /i \"$(args[InventorDoc].path)\" /al \"$(appbundles[SomeApp].path)\" /s \"$(settings[script].path)\""
  ],
...
© www.soinside.com 2019 - 2024. All rights reserved.