因此,我一直在研究是否有可能直接从设计自动化中创建一个SVF文件,这样每当您更新模型时,您就不必再通过模型派生来查看它。从This sample看起来这是可能的,有没有更好的文档来解决这个问题呢?
发布于 2019-09-16 13:59:32
啊,我发现了一些应该工作得相对较好的东西(除了提取的源代码),它隐藏在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来处理模型,我会感到惊讶。
发布于 2019-09-16 13:41:01
不幸的是,Design Automation服务本身并不完全提供这样的功能。
我不确定是否有此方法的示例代码,但您完全可以从设计自动化服务获得一个回调(详情请参阅here )到您的后端,然后调用插件中的模型派生服务在您的后端启动一个SVF翻译作业-您的后端可以像无服务器函数一样简单,云原生。
如果你尝试在你的插件中进行http调用,不要认为它会起作用,因为我们的云引擎本身可能有必要的网络访问来满足请求-我还没有真正验证过自己,所以请随意尝试一下。
https://stackoverflow.com/questions/57954360
复制相似问题