Skip to content

Latest commit

 

History

History
57 lines (30 loc) · 3.23 KB

File metadata and controls

57 lines (30 loc) · 3.23 KB

Task 4 - Display the Model in the Viewer

There are two ways by which you can display the model in the Viewer.

Option 1: Embed the source file URN in an HTML page you create

  1. Insert an instance of the Viewer in an HTML page, and initialize it as per the instructions provided in the following Viewer documentation topics on the Forge portal:

    a. Add Viewer to an HTML Page

    b. Intialize Viewer

    Note:

    SVF and SVF2 require different settings for the api and env parameters at initialization. See the following table for the values to use for this tutorial:

    Parameter SVF SVF2
    api derivativeV2 streamingV2
    env AutodeskProduction AutodeskProduction2
  2. Embed the URL safe Base64-encoded URN of the source file, which you obtained in the previous task, as described in the topic Load a Model

Note: You must prepend urn: to the URL safe Base64-encoded URN, when you embed it in the JavaScript code, as shown in the following image.

URN in Viewer

Option 2: Provide source file URN as an input to an existing HTML page

We have created two web pages based on the instructions provided in Option 1. One page is for SVF, and the other for SVF2. You can use them to verify the SVF/SVF2 file you just generated.

  1. Display the webpage by clicking the link in the relevant column from the following table:
SVF SVF2
Show Web page Show Web page
SVF Web Page SVF2 Web Page
Show Source Show Source
  1. In the Access Token box, specify the access token you obtained in task 1 of this tutorial.

  2. In the Source File URN (encoded) box, specify the URL safe Base64-encoded URN of the source file, which you obtained in task 3.

  3. Click Submit.

    You should see a screen similar to the following image.

    Default Viewable

◀️