How to set custom properties for an object via its

2020-03-31 07:30发布

问题:

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.

回答1:

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.

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.

This article also deals with that topic: Use Forge or Spreadsheet to Create Shared Parameters