Translate a File into OBJ Format
To translate a supported file into OBJ format, first get an access token with the data:read
and data:write
scopes. Note that only certain types of files can be translated into OBJ format. To find out which types of files can be translated into what format, see the Supported Translation Formats Table.
The platform requires that the urn of the file be Base-64 encoded. Fortunately, the jsonlite
package has a nifty function for encoding the urn.
Then, translate the file into OBJ format:
To check the status of the translation process:
To download an OBJ file locally, we need the output urn
of the translated file, which is different than the urn
of the source file. In this case, use the getOutputUrn()
function, which returns an object containing the result
, output urn
and other activity information.
Depending on the type of file and translation process, the response may contain multiple output urn
s for different file types (e.g. obj, svf, png). In order to find the correct OBJ file, look through the resp
object for a urn
than ends in “.obj” and assign this urn
to myOutputUrn
, which should look similar to the following:
Finally, to download the OBJ file locally:
Last updated