I want to custom translate a model in the forge configurator inventor. This model will be a model that is created and cached after the update process. I want to translate the abc.iam file in the "cache / projectid / hash / model.zip" file and get the urn after this operation.
I couldn't find the document about translate object custom. Also, how can I do this with the model in the cache of this project?
This is how the content is organized - highlighted the bucket name:
You can either use the https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-details-GET/ endpoint to get the ObjectId of the file or construct it yourself based on the template: urn:adsk.objects:os.object:<bucket name>/<file name URL encoded>
Note: make sure the file name is URL encoded if making the REST call directly instead of using the Forge SDK
You can see what ObjectId is provided for a given file e.g. using the Autodesk Forge Tools Extension in VS Code:
You need to base64 encode the ObjectId in order to get the urn of the file and then use that to kick off the translation: https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/translate-zip-to-stl/
In case of a zip file you also have to provide the rootFilename
(it's pointed out in the sample referenced above) - in case of e.g. the Wheel assembly that's the WheelAssembly.iam
file