autodesk-forge - APS 设计自动化 - 打开 Revit 云模型

标签 autodesk-forge autodesk-designautomation

我正在尝试按照此博客文章调整设计自动化以支持访问 Revit Cloud 模型

link to Blog

我的问题是如何调整命令行以不包含 rvtFile,因为它将由 inputJson 信息(projectGuid/modelGuid)打开。简单地从命令和参数列表中抑制它?下面的数据体正确吗?

{
            "id": "UpdateParametersActivity",
            "commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /al \"$(appbundles[DA_UpdateParameters].path)\"" ],
            "parameters": {
              "inputJson": { 
                  "verb": "get",
                  "description":"input json", 
                  "localName":"params.json",
                  "ondemand": false, 
                  "required" :false, 
                  "zip": false 
              }
            },
            "engine": "Autodesk.Revit+2022",
            "appbundles": [ "ME_BimViewer_DES.DA_UpdateParameters+test" ],
            "description": "Update Parameters from Revit file."
    }

最佳答案

是的,在命令行中跳过 /i 参数可以让您无需 DA 打开文档。您的命令行是正确的,您尝试过吗?

"commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /al \"$(appbundles[DA_UpdateParameters].path)\"" ],

您必须使用以下方式自行打开文档:

var cloudModelPath = ModelPathUtils.ConvertCloudGUIDsToCloudPath(inputParams.Region, inputParams.ProjectGuid, inputParams.ModelGuid);
Document doc = rvtApp.OpenDocumentFile(cloudModelPath, new OpenOptions());

关于autodesk-forge - APS 设计自动化 - 打开 Revit 云模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77419968/

相关文章:

javascript - SignalR 无法使用任何可用的传输从客户端连接到服务器

javascript - 如何获取Viewer中仅可见对象的dbId?

autodesk-forge - 如何使用 Forge Design Automation API 将 BIM 360 中的 Revit 文件另存为云模型?

c# - 如何通过 DesignAutomationV3 (Forge API) Revit 导出 PDF

autodesk-forge - sceneUpdated() 与 invalidate()

amazon-s3 - {urn}/manifest/{derivativeurn}/signedcookies - MissingKeyMissing Key-Pair-Id 查询

javascript - 无法运行查看器

autodesk-forge - 如何在没有 ngrok 的情况下使用 Forge Design Automation?

Forge Design Automation API 的 Azure 存储设置