Request

Response

    Field Guide

    This section will walk you through some of the core JavaScript classes with which developers may need to interact when adding and customizing their Viewer experiences.

    Initialization

    Check the API Basics and Step-by-Step tutorials for examples on how to get the codebase. Read along to understand what JavaScript code needs to be added once the codebase is available in your browser’s runtime.

    Before The Viewer can be instantiated and used in an HTML, all subsystems will need to be initialized by calling Autodesk.Viewing.Intitialize().

    The method needs to be called only once, no matter how many Viewer instances are present in an HTML page. It will initialize subsystems such as loggers, internationalization, Three.js and others.

    The Viewer has a hard dependency on Three.js R71.

    Viewer3D instance

    The Viewer3D instance is the object responsible for interacting with the 3D scene and model. It provides access to most of the functionality available. Refer to the Viewer3D JavaScript Library documentation for details.

    The library offers the subclass GuiViewer3D, which provides a toolbar UI, with access to buttons, panels, and a Context Menu. Check the UI JavaScript Library section for details.

    Get started using Viewer3D by visiting the Basic Viewer tutorial.

    ViewingApplication

    Developers are encouraged to use the Viewer by initializing a ViewingApplication object. It provides reusable business logic to parse the manifest JSON and feed that information into the Viewer3D instance.

    Once the ViewingApplication is initialized, developers can then access the Viewer3D instance from it.

    var myViewer = viewingApp.getCurrentViewer();
    

    Get started using ViewingApplication by visiting the Basic Application tutorial.

    We recommend using Extensions to interact with the Viewer instance.

    Extensions

    An even better mechanism to access the Viewer3D instance is through extensions. Get first-hand experience with them by following the Extensions tutorial.

    Some of the core features, along with their UIs, are provided through native extensions bundled with the Viewer codebase. Here are a few of them:

    ExtensionDescription
    Measure provides a tool for measuring viewables and a panel to display results
    Markup a set of tools for drawing arrows, rectangles, text and other shapes on top of 2D and 3D models
    Collaboration
    provides the ability to collaborate on a common viewable, by sharing the camera view, selection and other operation with remote users over the internet

    The feature is also referred to as “Live Review”.

    Headless Viewer

    The Viewer is provided with and without a default UI. Use GuiViewer3D instance to get our default toolbar UI; use Viewer3D instance and have your application provide the desired customized experience.

    For details, check out the Headless Viewer tutorial.

    Toolbar Customization

    The default toolbar UI will be present only when GuiViewer3D is used. In these cases, developers can add additional buttons and panels by extending the Viewer’s UI classes.

    Check our tutorial section for a customization example.

    What’s Next?

    Remember to check out the JavaScript Library section for details on all classes and their methods.

     
    ______
    icon-svg-close-thick

    Cookie preferences

    Your privacy is important to us and so is an optimal experience. To help us customize information and build applications, we collect data about your use of this site.

    May we collect and use your data?

    Learn more about the Third Party Services we use and our Privacy Statement.

    Strictly necessary – required for our site to work and to provide services to you

    These cookies allow us to record your preferences or login information, respond to your requests or fulfill items in your shopping cart.

    Improve your experience – allows us to show you what is relevant to you

    These cookies enable us to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we use to deliver information and experiences tailored to you. If you do not allow these cookies, some or all of these services may not be available for you.

    Customize your advertising – permits us to offer targeted advertising to you

    These cookies collect data about you based on your activities and interests in order to show you relevant ads and to track effectiveness. By collecting this data, the ads you see will be more tailored to your interests. If you do not allow these cookies, you will experience less targeted advertising.

    icon-svg-close-thick

    THIRD PARTY SERVICES

    Learn more about the Third-Party Services we use in each category, and how we use the data we collect from you online.

    icon-svg-hide-thick

    icon-svg-show-thick

    Strictly necessary – required for our site to work and to provide services to you

    Qualtrics
    W
    Akamai mPulse
    W
    Digital River
    W
    Dynatrace
    W
    Khoros
    W
    Launch Darkly
    W
    New Relic
    W
    Salesforce Live Agent
    W
    Wistia
    W
    Tealium
    W
    Upsellit
    W
    CJ Affiliates
    W
    Commission Factory
    W
    Google Analytics (Strictly Necessary)
    W
    Typepad Stats
    W
    Geo Targetly
    W
    SpeedCurve
    W
    Qualified
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Improve your experience – allows us to show you what is relevant to you

    Google Optimize
    W
    ClickTale
    W
    OneSignal
    W
    Optimizely
    W
    Amplitude
    W
    Snowplow
    W
    UserVoice
    W
    Clearbit
    #
    YouTube
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Customize your advertising – permits us to offer targeted advertising to you

    Adobe Analytics
    W
    Google Analytics (Web Analytics)
    W
    AdWords
    W
    Marketo
    W
    Doubleclick
    W
    HubSpot
    W
    Twitter
    W
    Facebook
    W
    LinkedIn
    W
    Yahoo! Japan
    W
    Naver
    W
    Quantcast
    W
    Call Tracking
    W
    Wunderkind
    W
    ADC Media
    W
    AgrantSEM
    W
    Bidtellect
    W
    Bing
    W
    G2Crowd
    W
    NMPI Display
    W
    VK
    W
    Adobe Target
    W
    Google Analytics (Advertising)
    W
    Trendkite
    W
    Hotjar
    W
    6 Sense
    W
    Terminus
    W
    StackAdapt
    W
    The Trade Desk
    W
    RollWorks
    W

    Are you sure you want a less customized experience?

    We can access your data only if you select "yes" for the categories on the previous screen. This lets us tailor our marketing so that it's more relevant for you. You can change your settings at any time by visiting our privacy statement

    Your experience. Your choice.

    We care about your privacy. The data we collect helps us understand how you use our products, what information you might be interested in, and what we can improve to make your engagement with Autodesk more rewarding.

    May we collect and use your data to tailor your experience?

    Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.
    Version 6