问题
SVF2 has different objectid
s/dbid
s than SVF1. In this SO-Answer, it was advised to use externalId
instead of objectid
. However, viewer.loadModel(svfUrl,{ids:[dbIds...]})
takes dbId
s to load only specified objects. How can I load only specified objects using SVF2 and the https://developer.api.autodesk.com/modelderivative/v2/regions/eu/designdata/:urn /metadata/:guid/properties
endpoint? Can I access the svf2 objectIds
anywhere or can I use the externalIds
when calling Viewer3d::loadModel
?
回答1:
You're right, there's a difference between the "SVF1 dbIDs" and the "SVF2 dbIDs" - the IDs in SVF2 format are "persistent", meaning that in different versions of the same design file, a single ID will reference the same design element (which was not the case in SVF1).
Unfortunately, there are parts of the platform (like the loadModel
viewer method and the /modelderivative/v2/regions/eu/designdata/:urn /metadata/:guid/properties
endpoint) that have not "caught up" with SVF2 yet. And before those updates are available, you would have to map "between the old and new dbIDs" manually which is itself another, non-trivial task.
来源:https://stackoverflow.com/questions/65337708/how-can-i-load-only-specifc-objects-in-the-forge-viewer-using-sfv2