Global

Members

(readonly) AttributeType

Default Value:
  • {
      "Unknown": 0,
      "Boolean": 1,
      "Integer": 2,
      "Double": 3,
      "Float": 4,
      "BLOB": 10,
      "DbKey": 11,
      "String": 20,
      "LocalizableString": 21,
      "DateTime": 22,
      "GeoLocation": 23,
      "Position": 24
    }

Numeric values and their meanings associated to PropertyResult.type.

(constant) EVENT_EDITFRAME_EDITION_END

The selected markup is no longer being modified

(constant) EVENT_EDITFRAME_EDITION_START

The selected markup is being modified

(constant) EVENT_EDITMODE_CREATION_BEGIN

Fired when a markup creation begins.
For example, as soon as the user starts dragging with the mouse
to draw an arrow on the screen.

(constant) EVENT_EDITMODE_CREATION_END

Fired when a markup has been created.
For example, as soon as the user stops dragging and releases the
mouse button to finish drawing an arrow on the screen

(constant) EVENT_HISTORY_CHANGED

Fired whenever a new undo or redo action is available.

(constant) EVENT_MARKUP_DESELECT

Fired when a markup is no longer selected.

Methods

createIterator()

Returns an iterator specialized for search results, which consists of an Array containing
objects with { delegate:TreeDelegate, ids: Array }

Must invoke init() before usage.

createUI(extension)

Parameters:
Name Type Description
extension

getResultCount(results) → {Number}

Parameters:
Name Type Description
results Array
Returns:

The amount of search results across all loaded models.

Type
Number

Type Definitions

GetPropertiesResult

See:
Properties:
Name Type Description
dbId number

the id passed into getProperties function.

externalId string

an identifier that can be used in the un-translated version of the model. Can be used for desktop application integrations.

name string

The element's name.

properties Array.<PropertyResult>

list of associated properties

Object with properties associated with a dbId.

Type:
  • object

InitOptions

Properties:
Name Type Description
env string

Can be "AutodeskProduction" (default), "AutodeskStaging", or "AutodeskDevelopment".

api string

Can be undefined (default),
use "modelDerivativeV2" or "derivativeV2" for US data center,
or use "derivativeV2_EU" for European data center.

getAccessToken function

A function that provides an access token asynchronously.
The function signature is getAccessToken(onSuccess), where onSuccess is a callback that getAccessToken
function should invoke when a token is granted, with the token being the first input parameter for the
onSuccess function, and the token expire time (in seconds) being the second input parameter for the
function. Viewer relies on both getAccessToken and the expire time to automatically renew token, so
it is critical that getAccessToken must be implemented as described here.

language string

Preferred language code as defined in RFC 4646, such as "en", "de", "fr", etc.
If no language is set, viewer will pick it up from the browser. If language is not as defined in RFC,
viewer will fall back to "en" but the behavior is undefined.

logLevel number

Specifies which types of messages will be logged into the console.
Values are: 5 Debug, 4 Logs, 3 Info, 2 Warnings, 1 Errors, 0 None.
Defaults to (1) for Errors only.
All values can be found in Autodesk.Viewing.Private.LogLevels.

webGLHelpLink string

A link url to a help page on webGL if it's disabled. Supported only
when using the GuiViewer3D instance; not supported in headless mode.

Type:
  • Object

PropertyResult

Properties:
Name Type Description
attributeName string

The property identifying name.

displayCategory string | null

Category the attribute belongs into.

displayName string

A user facing label for the property. It could contain the same value as attributeName.

displayValue string | number | boolean

The value for the property.

hidden boolean

Whether the property is meant to be user facing or not.

precision number

Applies only to numerical displayValues.

type AttributeType

An enumeration value indicating how to interpret displayValue.

units string | null

The units associated with displayValue.

Element type for GetPropertiesResult.properties.

Type:
  • object

ViewerConfig

Properties:
Name Type Attributes Default Description
extensions Array.<string> <optional>

Ids of extensions that need to be loaded always. Refer to Autodesk.Viewing.Extensions.

sharedPropertyDbPath string <optional>

Some documents have a global Property Database file, which is shared across all
referenced 2D and 3D models. Use Document.getPropertyDbPath() to populate this field;
automatically populated when using a ViewingApplication instance.

canvasConfig Object <optional>

Allows to modify the default user input interactions with the viewer. For example, one
could change the left-mouse click to isolate a node instead of selecting it.

startOnInitialize boolean <optional>
true

Whether Autodesk.Viewing.Viewer3D#run gets invoked as soon as initialization is complete,
effectively commencing the viewer's main rendering loop.

experimental Array.<string> <optional>

An interface to enable experimental features that are yet to be released.
Each feature is identified with a string. To enable a feature, remove the first two double dashes.

Configuration object passed to the Autodesk.Viewing.Viewer3D constructor.

Type:
  • Object