AutoDeskR
  • Preface
  • Acknowledgements
  • Introduction
  • Authentication
  • Data Management API
    • Create a Bucket and Upload a File
  • Design Automation API
    • Convert a DWG File to a PDF File
  • Model Derivative API
    • Translate a File into OBJ Format
    • Prepare a File for the Viewer
    • Extract Data from a File
  • Viewer
  • Common Issues
Powered by GitBook
On this page

Was this helpful?

Viewer

PreviousExtract Data from a FileNextCommon Issues

Last updated 5 years ago

Was this helpful?

AutoDesk provides a WebGL-based viewer for rendering 2D and 3D models. To use the viewer, make sure to first follow the instructions in Prepare a File for the Viewer above. Then simply pass the urn of the file and the token to the viewer3D() function:

viewer3D(urn = myEncodedUrn, token = myToken)
aerial

The viewer can also be embedded in Shiny applications, interactive R markdown documents, and other web pages thanks to the Shiny Modules framework. Here is a simple example of a Shiny app and the viewerUI() function:

ui <- function(request) {
 shiny::fluidPage(
   viewerUI("pg", myEncodedUrn, myToken)
 )
}
server <- function(input, output, session) {
}
shiny::shinyApp(ui, server)