是否有使用Design Automation API转换为SVF查看器的选项

时间:2019-12-21 17:18:36

标签: autodesk-forge autodesk-designautomation

我只是在考虑是否可以使用Design Automation API创建SVF Viewer,并避免使用Model Derivative API。 几个月前,我与Forge支持团队进行了交谈,他们告诉我,由于翻译量很大,从经济角度考虑,使用Design Automation十分方便。

预先感谢

2 个答案:

答案 0 :(得分:0)

不幸的是,据我所知,目前不支持在Design Automation API上进行SVF转换,除了AutoCAD。您可以使用此活动通过用于AutoCAD的Design Automation API生成SVF:

{
    "commandLine": [
        "$(engine.path)\\accoreconsole.exe /i $(args[HostDwg].path) /al $(appbundles[Publish2View22].path) /s $(settings[script].path) /suppressGraphics"
    ],
    "parameters": {
        "HostDwg": {
            "verb": "get",
            "description": "Host drawing",
            "required": true,
            "localName": "$(HostDwg)"
        },
        "Result": {
            "zip": true,
            "verb": "post",
            "description": "Results",
            "required": true,
            "localName": "result"
        }
    },
    "id": "AutoCAD.AcSvfPublish+prod",
    "engine": "Autodesk.AutoCAD+22",
    "appbundles": [
        "AutoCAD.Publish2View22+prod"
    ],
    "settings": {
        "script": {
            "value": "(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": 4
}

答案 1 :(得分:0)

3ds Max引擎还支持生成svf文件。您应该能够轻松编写脚本以导出到svf并在Design Automation中执行它。

有关如何在maxscript中导出的信息,请参见此文档:

https://help.autodesk.com/view/3DSMAX/2020/ENU/?guid=GUID-624D3D05-B15D-4A97-9F15-DA35CDB0DDD2#GUID-624D3D05-B15D-4A97-9F15-DA35CDB0DDD2__SECTION_EB566E2CC6444FCEAD2EE67BB366F727

请参阅本教程,了解如何在3ds Max的Design Automation中执行脚本:

https://forge.autodesk.com/en/docs/design-automation/v3/tutorials/3dsmax/