Request

Response

    Core

    Autodesk.Viewing.Model

    new Model()

    Core class representing the geometry.


    Methods

    fetchTopology(maxSizeMB)

    Downloads the topology file, if one is available. The file may not get downloaded if the topology content size in memory is bigger than a specified limit (100 MB by default, 20 MB for mobile).

    Parameters

    maxSizeMB*
    number
    Maximum uncompressed topology size allowed (in MegaBytes).
    * Required

    Returns

    TypeDescription
    Promise that resolves with the topology object.

    geomPolyCount()

    Returns the polygon count.

    Returns

    TypeDescription
    number

    getBoundingBox()

    Returns

    TypeDescription
    THREE.Box3 Bounding box of the model if available, otherwise null.

    getBulkProperties(dbIds,options,onSuccessCallback,onErrorCallback)

    Returns properties for multiple objects with an optional filter on which properties to retrieve.

    Parameters

    Expand all
    dbIds*
    array.<int>
    IDs of the nodes to return the properties for.
    options*
    object|undefined
    Dictionary with options.
    propFilter
    array.<string>
    Array of property names to return values for. Use null for no filtering. Filter applies to “name” and “externalId” fields also.
    ignoreHidden
    boolean
    Ignore hidden properties
    onSuccessCallback*
    function
    This method is called when request for property db succeeds.
    onErrorCallback*
    function
    This method is called when request for property db fails.
    * Required

    getData()

    Returns the geometry data.

    getDefaultCamera()

    Returns the default camera.

    getDisplayUnit()

    Returns a standard string representation of the model’s display unit.

    Returns

    TypeDescription
    string Standard representation of model’s display unit or null if it is not known.

    getDocumentNode()

    Returns an object wrapping the bubble/manifest entry for the loaded geometry. Contains data such as the viewableID, guid, role…

    getExternalIdMapping(onSuccessCallback,onErrorCallback)

    Returns an object with key values being dbNodeIds and values externalIds. Useful to map LMV node ids to Fusion node ids.

    Parameters

    onSuccessCallback*
    function
    This method is called when request for property db succeeds.
    onErrorCallback*
    function
    This method is called when request for property db fails.
    * Required

    getFastLoadList()

    Helper functions for fastLoad

    getFragmentMap()

    Returns

    TypeDescription
    DbidFragmentMap|InstanceTree Maps dbIds to fragment ids.

    getInstanceTree()

    Returns

    TypeDescription
    InstanceTree Instance tree of the model if available, otherwise null.

    getLayersRoot()

    Returns the root of the layers tree.

    Not yet implemented in 3D.

    Returns

    TypeDescription
    object The root of the layers tree or null if it doesn’t exist.

    getMetadata(itemName,subitemName,defaultValue)

    Return metadata value.

    Parameters

    itemName*
    string
    Metadata item name.
    subitemName
    string
    Metadata subitem name.
    defaultValue
    *
    Default value.
    * Required

    Returns

    TypeDescription
    * Metadata value, or defaultValue if no metadata or metadata item/subitem does not exist.

    getObjectTree(onSuccessCallback,onErrorCallback)

    Returns object tree.

    Parameters

    onSuccessCallback*
    function
    This method is called when request for object tree succeeds.
    onErrorCallback*
    function
    This method is called when request for object tree fails.
    * Required

    getProperties(dbId,onSuccessCallback,onErrorCallback)

    Returns object properties.

    Parameters

    dbId*
    int
    ID of the node to return the properties for.
    onSuccessCallback*
    function
    This method is called when request for property db succeeds.
    onErrorCallback*
    function
    This method is called when request for property db fails.
    * Required

    getRoot()

    Returns the root of the geometry node graph.

    Returns

    TypeDescription
    object The root of the geometry node graph. Null if it doesn’t exist.

    getRootId()

    Returns the root of the geometry node graph.

    Returns

    TypeDescription
    number The ID of the root or null if it doesn’t exist.

    getTopoIndex(fragId)

    Return topology index of the fragment.

    Parameters

    fragId*
    number
    Fragment ID.
    * Required

    Returns

    TypeDescription
    number Topology index.

    getTopology(index)

    Return topology data of one fragment.

    Requires topology data to have been fetched with fetchTopology().

    Parameters

    index*
    number
    Topology index.
    * Required

    Returns

    TypeDescription
    object Topology data.

    getUnitData(unit)

    Returns an object that contains the standard unit string (unitString) and the scale value (unitScale).

    Parameters

    unit*
    string
    Unit name from the metadata
    * Required

    Returns

    TypeDescription
    object This object contains the standardized unit string (unitString) and a unit scaling value (unitScale)

    getUnitScale()

    Returns the scale factor of model’s distance unit to meters.

    Returns

    TypeDescription
    number The scale factor of the model’s distance unit to meters or unity if the units aren’t known.

    getUnitString()

    Returns a standard string representation of the model’s distance unit.

    Returns

    TypeDescription
    string Standard representation of model’s unit distance or null if it is not known.

    getUpVector()

    Returns up vector as an array of 3.

    hasTopology()

    See also fetchTopology().

    Returns

    TypeDescription
    boolean true if topology data has been downloaded and is available in memory

    instancePolyCount()

    Returns the instanced polygon count.

    Returns

    TypeDescription
    number

    is2d()

    Returns

    TypeDescription
    boolean Whether the model is 2D.

    is3d()

    Returns

    TypeDescription
    boolean Whether the model is 3D.

    isAEC()

    Returns whether the “AEC” loader settings were used when loading the model

    isLoadDone()

    Returns true if the model with all its geometries has loaded.

    Returns

    TypeDescription
    boolean

    isObjectTreeCreated()

    Returns true if the frag to node id mapping is done.

    Returns

    TypeDescription
    boolean

    isObjectTreeLoaded()

    Returns true only when the object tree is loaded into memory. Will return false while the object tree is still loading, or when the object tree fails to load.

    Available since version 2.13

    Returns

    TypeDescription
    boolean

    pageToModel()

    Paper coordinates to Model coordinates

    pointInClip()

    Find the viewports that point lies in its bounds.

    search(text,onSuccessCallback,onErrorCallback,attributeNames)

    Searches the object property database.

    Parameters

    text*
    string
    The search term (not case sensitive).
    onSuccessCallback*
    function
    This method is called when request for search succeeds.
    onErrorCallback*
    function
    This method is called when request for search fails.
    attributeNames
    Array.<string>
    Restricts search to specific attribute names.
    * Required

    setData(data)

    Set the geometry data.

    Parameters

    data*
    object
    Data that represents the geometry.
    * Required

    setUUID(urn)

    Set a UUID to identify the SVF model

    Parameters

    urn*
    string
    Data that represents the geometry.
    * Required
     
    ______
    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.