Download a file from the AutoDesk Platform Services using the Model Derivative API.
Arguments
- urn
A string. Source URN (objectId) for the file. Note the URN must be Base64 encoded. To encode the URN, see, for example, the
jsonlite::base64_encfunction.- output_urn
A string. Output URN retrieved via
getOutputUrn.- token
A string or
aps_tokenobject withdata:readanddata:writescopes.- destfile
A string. Local file path to save binary responses (e.g. downloaded geometry files). When
NULLand the response is not JSON, a warning is issued and the raw bytes are returned.
Value
An object containing either parsed JSON content or, for binary responses, the path to the saved file.
Examples
if (FALSE) { # \dontrun{
# Download the "aerial.dwg" obj file
myEncodedOutputUrn <- jsonlite::base64_enc(myOutputUrn)
resp <- downloadFile(urn <- myEncodedUrn, output_urn <- myEncodedOutputUrn,
token = myToken, destfile = "aerial.obj")
} # }
