【问题标题】:create viewer SVF in design automation在设计自动化中创建查看器 SVF
【发布时间】:2020-01-17 03:27:24
【问题描述】:

因此,我一直在研究是否可以直接从设计自动化中创建 SVF 文件,这样每当您更新模型时,您就不必再通过模型派生来查看它。看起来可以从This sample 获得,有没有更好的文档?

【问题讨论】:

    标签: autodesk-forge autodesk-designautomation


    【解决方案1】:

    啊,我发现了一些应该工作得相对较好的东西(除了有它们提取的来源),它隐藏在 design automation field guide examples 的某个地方! 因此,您可以使用那些特殊的设计自动化 AutoCad 命令来完成这些任务。 _prepareforpropertyextraction _indexextractor _publishtosvf _createbubblepackage

    "(command \"_prepareforpropertyextraction\" \"index.json\")\n(command \"_indexextractor\" \"index.json\")\n(command \"_publishtosvf\" \"./output/result.svf\")\n(command \"_createbubblepackage\" \"./output\" \"./result\" \"\" \"\")\n"

    完整样本

    { "commandLine": [ "$(engine.path)\\accoreconsole.exe /i $(args[HostDwg].path) /al $(appbundles[Publish2View22].path) /s $(settings[script].path)" ], "parameters": { "HostDwg": { "verb": "get", "description": "Host drawing", "localName": "$(EmptyDwg)" }, "Result": { "zip": true, "verb": "post", "description": "Results", "localName": "result" } }, "engine": "Autodesk.AutoCAD+22", "appbundles": [ "AutoCAD.Publish2View22+prod" ], "settings": { "script": "(command \"_prepareforpropertyextraction\" \"index.json\")\n(command \"_indexextractor\" \"index.json\")\n(command \"_publishtosvf\" \"./output/result.svf\")\n(command \"_createbubblepackage\" \"./output\" \"./result\" \"\" \"\")\n" }, "description": "AutoCAD translation sample generating SVF via core console.", "version": 1, "id": "AutoCAD.AcSvfPublish+prod" }

    有道理,如果模型衍生 API 没有在幕后使用设计自动化 API 来处理模型,我会感到惊讶。

    【讨论】:

      【解决方案2】:

      很遗憾,设计自动化服务本身并不完全提供此类功能。

      不确定是否有此方法的示例代码,但您完全可以从设计自动化服务获取回调(有关详细信息,请参阅here)到您的后端,然后在插件中调用模型衍生服务以启动 SVF在您的后端进行翻译工作 - 您的后端可以像无服务器功能一样简单、云原生。

      尽管您尝试在插件中进行 http 调用,但不要认为它会起作用,因为我们的云引擎本身可能具有满足请求所需的网络访问权限 - 尚未真正验证我自己,所以请随意试一试。

      【讨论】:

        猜你喜欢
        • 2020-05-03
        • 2020-04-13
        • 2021-06-07
        • 2021-03-19
        • 2021-02-25
        • 2016-03-13
        • 1970-01-01
        • 1970-01-01
        • 2017-12-15
        相关资源
        最近更新 更多