Autodesk forge Revit工作项参数未解析的设计自动化

Autodesk forge Revit工作项参数未解析的设计自动化,autodesk-forge,autodesk-designautomation,Autodesk Forge,Autodesk Designautomation,我有一个向Design Automation for Revit Design Automation v3 beta提交工作项的应用程序。提交的大多数工作项工作正常,但模型的某些版本似乎无法解析rvtFile参数。这将导致cloud Revit进程无法运行,因为“文件名”参数错误 活动机构员额: { "id": "ExtractModelCategoriesActivity", "commandLine": ["$(engine.path)\\\\revitcoreconsole.exe /i

我有一个向Design Automation for Revit Design Automation v3 beta提交工作项的应用程序。提交的大多数工作项工作正常,但模型的某些版本似乎无法解析rvtFile参数。这将导致cloud Revit进程无法运行,因为“文件名”参数错误

活动机构员额:

{
"id": "ExtractModelCategoriesActivity",
"commandLine": ["$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"],
"parameters": {
    "rvtFile": {
        "zip": false,
        "ondemand": false,
        "verb": "get",
        "description": "Input Revit model",
        "required": true,
        "localName": "$(rvtFile)"
    },
    "result": {
        "zip": false,
        "ondemand": false,
        "verb": "put",
        "description": "Model object categories by view",
        "required": false,
        "localName": "ModelCategories.json"
    }
},
"engine": "Autodesk.Revit+2019",
"appbundles": ["alias_was_here.ExtractModelCategories+prod"],
"description": "Extract Model Categories to JSON Activity."
}
工作内容项目员额:

    {
    "activityId": "alias_was_here.ExtractModelCategoriesActivity+prod",
    "arguments": {
        "rvtFile": {
            "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/83b5eb1e-c9b7-4938-ad4e-8efc4789d0e2.rvt?scopes=b360project.22109894-5897-4aa9-96ab-2e3310bc4ae9,global,O2tenant.5952590",
            "Headers": {
                "Authorization": "Bearer token_was_here"
            }
        },
        "result": {
            "verb": "put",
            "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/9dde6073-d490-4fd0-991e-4ff92af1957e.json",
            "Headers": {
                "Authorization": "Bearer token_was_here"
            }
        },
        "onComplete": {
            "verb": "post",
            "url": "callback_url_was_here"
        }
    }
}
从report.txt文件成功提交:

[04/16/2019 12:03:50] Job information:
"CommandLine":[
  "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"
]
"Settings":{
  "dasreportfailedlimits": {
    "value": "true",
    "isEnvironmentVariable": true
  }
}
"Id":"e23918d475a74145aade32ba8968e5c3"
"ActivityId":"alias_was_here.ExtractModelCategoriesActivity+prod"
"Engine.Id":"Autodesk.Revit!21"
"Apps": [
"App.Id":"alias_was_here.ExtractModelCategories!1"
]
"BoundArguments":{
  "rvtFile": {
    "localName": "$(rvtFile)",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/839a11d8-51e9-42de-8936-28687feda65f.rvt?scopes=b360project.1949ed9d-e7fd-42b9-98f4-544fff3df42f,global,O2tenant.2971682",
    "headers": {
      "Authorization": "Bearer token_was_here"
    }
  },
  "result": {
    "localName": "ModelCategories.json",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/dd19b8f6-ac51-45b9-8f42-51c7c6a9d257.json",
    "headers": {
      "Authorization": "Bearer token_was_here"
    },
    "verb": "put"
  },
  "onComplete": {
    "ondemand": true,
    "optional": true,
    "url": "callback_was_here",
    "verb": "post"
  },
  "onProgress": {
    "ondemand": true,
    "url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Prod/v3/workitems/progress",
    "headers": {
      "Content-Type": "application/json",
      "x-das-authorize": "awssigv4(us-east-1)",
      "x-ads-token-data": "{\"access_token\":{\"client_id\":\"alias_was_here\"},\"scope\":\"bucket:create bucket:read data:read data:create data:write code:all\",\"expires_in\":3595,\"client_id\":\"alias_was_here\"}",
      "x-ads-developer-email": "email_was_here"
    },
    "verb": "put"
  }
}

 - snip -


[04/16/2019 12:03:57] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_e23918d475a74145aade32ba8968e5c3 "T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\userdata" /exe "T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe"  /i T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\839a11d8-51e9-42de-8936-28687feda65f.rvt /al T:\Aces\Applications\779cf68955e15ce6704c72a62c734afe.alias_was_here.ExtractModelCategories[1].package.

 - snip -

[04/16/2019 12:03:57] Echoing command line args:
[04/16/2019 12:03:57]   0:/i
[04/16/2019 12:03:57]   1:T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\839a11d8-51e9-42de-8936-28687feda65f.rvt

 - snip -

[04/16/2019 12:03:57] Running user application....

 - snip -

[04/16/2019 12:04:22] Job finished with result Succeeded
[04/16/2019 12:04:22] Job Status:
{
  "status": "success",

  ...
    [04/16/2019 12:04:44] Job information:
"CommandLine":[
  "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"
]
"Settings":{
  "dasreportfailedlimits": {
    "value": "true",
    "isEnvironmentVariable": true
  }
}
"Id":"4db3208a1c4e429c846c4da385f2219d"
"ActivityId":"alias_was_here.ExtractModelCategoriesActivity+prod"
"Engine.Id":"Autodesk.Revit!21"
"Apps": [
"App.Id":"alias_was_here.ExtractModelCategories!1"
]
"BoundArguments":{
  "rvtFile": {
    "localName": "$(rvtFile)",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/e597df42-07c7-41e1-aa0c-fa1abd179a4c.rvt?scopes=b360project.1949ed9d-e7fd-42b9-98f4-544fff3df42f,global,O2tenant.2971682",
    "headers": {
      "Authorization": "Bearer token was here"
    }
  },
  "result": {
    "localName": "ModelCategories.json",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/6b59f894-bbf0-421a-bf0b-e80d7584ee33.json",
    "headers": {
      "Authorization": "Bearer token_was_here"
    },
    "verb": "put"
  },
  "onComplete": {
    "ondemand": true,
    "optional": true,
    "url": "callback_was_here",
    "verb": "post"
  },
  "onProgress": {
    "ondemand": true,
    "url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Prod/v3/workitems/progress",
    "headers": {
      "Content-Type": "application/json",
      "x-das-authorize": "awssigv4(us-east-1)",
      "x-ads-token-data": "{\"access_token\":{\"client_id\":\"alias_was_here\"},\"scope\":\"bucket:create bucket:read data:read data:create data:write code:all\",\"expires_in\":3596,\"client_id\":\"alias_was_here\"}",
      "x-ads-developer-email": "email_was here"
    },
    "verb": "put"
  }
}

 - snip -

[04/16/2019 12:04:56] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_4db3208a1c4e429c846c4da385f2219d "T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\userdata" /exe "T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe"  /i T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile) /al T:\Aces\Applications\779cf68955e15ce6704c72a62c734afe.alias_was_here.ExtractModelCategories[1].package.

 - snip -

[04/16/2019 12:04:56] Echoing command line args:
[04/16/2019 12:04:56]   0:/i
[04/16/2019 12:04:56]   1:T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile)

[04/16/2019 12:04:56] Running user application....
[04/16/2019 12:05:02] Exception: Revit input file not found: T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile)

 - snip -

[04/16/2019 12:05:03] Job finished with result FailedExecution
[04/16/2019 12:05:03] Job Status:
{
  "status": "failedInstructions",

  ...
从report.txt文件中查找提交失败的文件:

[04/16/2019 12:03:50] Job information:
"CommandLine":[
  "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"
]
"Settings":{
  "dasreportfailedlimits": {
    "value": "true",
    "isEnvironmentVariable": true
  }
}
"Id":"e23918d475a74145aade32ba8968e5c3"
"ActivityId":"alias_was_here.ExtractModelCategoriesActivity+prod"
"Engine.Id":"Autodesk.Revit!21"
"Apps": [
"App.Id":"alias_was_here.ExtractModelCategories!1"
]
"BoundArguments":{
  "rvtFile": {
    "localName": "$(rvtFile)",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/839a11d8-51e9-42de-8936-28687feda65f.rvt?scopes=b360project.1949ed9d-e7fd-42b9-98f4-544fff3df42f,global,O2tenant.2971682",
    "headers": {
      "Authorization": "Bearer token_was_here"
    }
  },
  "result": {
    "localName": "ModelCategories.json",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/dd19b8f6-ac51-45b9-8f42-51c7c6a9d257.json",
    "headers": {
      "Authorization": "Bearer token_was_here"
    },
    "verb": "put"
  },
  "onComplete": {
    "ondemand": true,
    "optional": true,
    "url": "callback_was_here",
    "verb": "post"
  },
  "onProgress": {
    "ondemand": true,
    "url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Prod/v3/workitems/progress",
    "headers": {
      "Content-Type": "application/json",
      "x-das-authorize": "awssigv4(us-east-1)",
      "x-ads-token-data": "{\"access_token\":{\"client_id\":\"alias_was_here\"},\"scope\":\"bucket:create bucket:read data:read data:create data:write code:all\",\"expires_in\":3595,\"client_id\":\"alias_was_here\"}",
      "x-ads-developer-email": "email_was_here"
    },
    "verb": "put"
  }
}

 - snip -


[04/16/2019 12:03:57] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_e23918d475a74145aade32ba8968e5c3 "T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\userdata" /exe "T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe"  /i T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\839a11d8-51e9-42de-8936-28687feda65f.rvt /al T:\Aces\Applications\779cf68955e15ce6704c72a62c734afe.alias_was_here.ExtractModelCategories[1].package.

 - snip -

[04/16/2019 12:03:57] Echoing command line args:
[04/16/2019 12:03:57]   0:/i
[04/16/2019 12:03:57]   1:T:\Aces\Jobs\e23918d475a74145aade32ba8968e5c3\839a11d8-51e9-42de-8936-28687feda65f.rvt

 - snip -

[04/16/2019 12:03:57] Running user application....

 - snip -

[04/16/2019 12:04:22] Job finished with result Succeeded
[04/16/2019 12:04:22] Job Status:
{
  "status": "success",

  ...
    [04/16/2019 12:04:44] Job information:
"CommandLine":[
  "$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[ExtractModelCategories].path)"
]
"Settings":{
  "dasreportfailedlimits": {
    "value": "true",
    "isEnvironmentVariable": true
  }
}
"Id":"4db3208a1c4e429c846c4da385f2219d"
"ActivityId":"alias_was_here.ExtractModelCategoriesActivity+prod"
"Engine.Id":"Autodesk.Revit!21"
"Apps": [
"App.Id":"alias_was_here.ExtractModelCategories!1"
]
"BoundArguments":{
  "rvtFile": {
    "localName": "$(rvtFile)",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/e597df42-07c7-41e1-aa0c-fa1abd179a4c.rvt?scopes=b360project.1949ed9d-e7fd-42b9-98f4-544fff3df42f,global,O2tenant.2971682",
    "headers": {
      "Authorization": "Bearer token was here"
    }
  },
  "result": {
    "localName": "ModelCategories.json",
    "url": "https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/6b59f894-bbf0-421a-bf0b-e80d7584ee33.json",
    "headers": {
      "Authorization": "Bearer token_was_here"
    },
    "verb": "put"
  },
  "onComplete": {
    "ondemand": true,
    "optional": true,
    "url": "callback_was_here",
    "verb": "post"
  },
  "onProgress": {
    "ondemand": true,
    "url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Prod/v3/workitems/progress",
    "headers": {
      "Content-Type": "application/json",
      "x-das-authorize": "awssigv4(us-east-1)",
      "x-ads-token-data": "{\"access_token\":{\"client_id\":\"alias_was_here\"},\"scope\":\"bucket:create bucket:read data:read data:create data:write code:all\",\"expires_in\":3596,\"client_id\":\"alias_was_here\"}",
      "x-ads-developer-email": "email_was here"
    },
    "verb": "put"
  }
}

 - snip -

[04/16/2019 12:04:56] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_4db3208a1c4e429c846c4da385f2219d "T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\userdata" /exe "T:\Aces\AcesRoot\19.0\coreEngine\Exe\revitcoreconsole.exe"  /i T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile) /al T:\Aces\Applications\779cf68955e15ce6704c72a62c734afe.alias_was_here.ExtractModelCategories[1].package.

 - snip -

[04/16/2019 12:04:56] Echoing command line args:
[04/16/2019 12:04:56]   0:/i
[04/16/2019 12:04:56]   1:T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile)

[04/16/2019 12:04:56] Running user application....
[04/16/2019 12:05:02] Exception: Revit input file not found: T:\Aces\Jobs\4db3208a1c4e429c846c4da385f2219d\$(rvtFile)

 - snip -

[04/16/2019 12:05:03] Job finished with result FailedExecution
[04/16/2019 12:05:03] Job Status:
{
  "status": "failedInstructions",

  ...
据我所知,两份意见书的正文格式和结构都是相同的,都是同一型号的第10版和第11版。但是,对于失败的工作项,Revit文件名未进行解析,并且在DA处理该工作项时仍然是字符串$rvtFile,而不是实际的文件名


对这个问题有什么见解吗?提交的正文中有错误吗?我该如何更正

是否可以使用localName:input.rvt这样的静态文件名,而不是使用localName:$rvtFile?

我根据在Autodesk的钟武帮助下学到的知识回答自己的问题:

这是Revit API Beta版设计自动化当前的一个问题。如果Revit模型包含指向其他模型的链接,则下载到Design Automation的文件将被压缩,并包含主模型和链接文件。然后,设计自动化会失败,因为它需要一个Revit文件。这会在API端自动发生

解决方法是使用数据管理API将Revit文件下载到其他位置。如果数据管理API提供的文件是压缩文件而不是Revit模型,请将其解压缩。然后,将未压缩的Revit文件放置在Design Automation可以访问的位置,并发布引用未压缩文件位置的工作项

据我所知,Autodesk已在内部发出更改请求,以改进压缩文件的处理。我没有这方面的时间表

如果我了解更多,我将更新此答案

**更新**


这已由Autodesk Forge团队修复,现在可用于带有链接的Revit文件。谢谢大家!

通常,我们不会在workitem中设置参数localName,相反,它应该在activity中设置,请您在workitem中删除该参数,然后再试一次好吗?我已经进行了编辑,以包含工作项的POST请求的正文。我以前只包含了reportUrl输出的一部分。localName不在帖子的正文中。您能否将您的活动正文和工作项添加到问题中,以便我们进行检查?谢谢。我已经添加了活动和工作项帖子的主体。这看起来很奇怪,活动和工作项的主体对我来说似乎很好,我将与我们的工程师核实这一点,以获得更多信息,并尽快向您更新。