如何通过 Autodesk Forge Viewer 中的 dbid 设置对象的自定义属性? [英] How to set custom properties for an object via its dbid in Autodesk Forge Viewer?

查看:30
本文介绍了如何通过 Autodesk Forge Viewer 中的 dbid 设置对象的自定义属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过对象的 dbids 设置对象的自定义属性,但是 API 似乎无助于实现这一目标,因为它需要选择对象并且不保存属性.我还查看了 POST 参考 在模型衍生 API 和 PATCH,但它们用于文档级别,而不是模型项.

I'm trying to set custom properties for objects via their dbids but the API they provide doesn't seem to help to achieve that because it requires object to be selected and it doesn't save the property. I also look at POST references in Model Derivative API and PATCH in Data Management API, but they're used at document level, not model item.

推荐答案

模型中的所有资源当前都是只读的,因此您找不到任何允许您修改模型或其属性的端点.

All resources in a model are currently read-only, so you won't find any endpoint that allows you to modify a model or its properties.

一种解决方法是使用自定义数据库以及您自己的服务器公开的自定义端点,这将允许您修改被覆盖的属性.您可以查看此现场演示.源代码位于 Viewing.Extension.MetaProperties.

A workaround is to use a custom database along with custom endpoints exposed by your own server that would allow you to modify overwritten properties. You can take a look at this live demo. The source code is available at Viewing.Extension.MetaProperties.

本文也涉及该主题:使用伪造或电子表格创建共享参数

这篇关于如何通过 Autodesk Forge Viewer 中的 dbid 设置对象的自定义属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆