Request

Response

    Autodesk.Viewing.Private

    InstanceTree

    new InstanceTree()

    Methods

    isNodeHidden(dbId)

    Whether a node id is hidden.

    Parameters

    dbId*
    number
    The node’s database id
    * Required

    Returns

    typedescription
    boolean

    getNodeType(dbId)

    Gets the type associated with the node, such as assmebly, layer, model, geometry, etc.

    Parameters

    dbId*
    number
    The node’s database id
    * Required

    Returns

    typedescription
    number

    isNodeSelectable(dbId)

    Whether the node is a selectable entity.

    Parameters

    dbId*
    number
    The node’s database id
    * Required

    Returns

    typedescription
    boolean

    getNodeParentId(dbId)

    Gets the database id of the node’s parent.

    Parameters

    dbId*
    number
    The node’s database id
    * Required

    Returns

    typedescription
    number

    getRootId()

    Gets the model’s root database id.

    Returns

    typedescription
    number

    getNodeName(dbId)

    Gets the name associated to the id.

    Parameters

    dbId*
    number
    The node’s database id
    * Required

    Returns

    typedescription
    string

    getChildCount(dbId)

    Gets get number of children under the specified id.

    Parameters

    dbId*
    number
    The node’s database id
    * Required

    Returns

    typedescription
    number

    getNodeBox(dbId, dst)

    Sets the bounding box values for a particular id on the 2nd argument provided. There is no return value.

    Parameters

    dbId*
    number
    The node’s database id
    dst*
    Float32Array
    An array holding 6 number values: (min-x, min-y, min-z, max-x, max-y, max-z)
    * Required

    enumNodeFragments(node, callback, recursive)

    Parameters

    node*
    number
    The id of a node.
    callback*
    Autodesk.Viewing.Private.InstanceTree~onEnumNodeFragments
    Function that will be called for each fragment.
    recursive
    boolean
    Whether the callback function gets called for child nodes, too.
    * Required

    enumNodeChildren(node, callback, recursive)

    Parameters

    node*
    number
    The id of a node.
    callback*
    Autodesk.Viewing.Private.InstanceTree~onEnumNodeChildren
    Function that will be called for each child node.
    recursive
    boolean
    Whether the callback function gets called for indirect child nodes, too.
    * Required