Request

Response

    Autodesk.Viewing.UI

    ControlGroup

    new ControlGroup(id, options)

    Class for grouping controls.

    Parameters

    Expand all
    id
    string
    The id for this control group.
    options
    object
    An optional dictionary of options.
    collapsible
    boolean
    Whether this control group is collapsible.

    Methods

    addControl(control, options)

    Adds a control to this control group.

    Parameters

    Expand all
    control*
    Autodesk.Viewing.UI.Control
    The control to add.
    options
    object
    An option dictionary of options.
    index
    object
    The index to insert the control at.
    * Required

    Returns

    typedescription
    boolean True if the control was successfully added.

    indexOf(control)

    Returns the index of a control in this group. -1 if the item isn’t found.

    Parameters

    Returns

    typedescription
    number Index of a successfully removed control, otherwise -1.

    removeControl(control)

    Removes a control from this control group.

    Parameters

    Returns

    typedescription
    boolean True if the control was successfully removed.

    getControl(controlId)

    Returns the control with the corresponding ID if it is in this control group.

    Parameters

    controlId*
    string
    The ID of the control.
    * Required

    Returns

    typedescription
    Autodesk.Viewing.UI.Control The control or null if it doesn’t exist.

    getControlId(index)

    Returns the control ID with for corresponding index if it is in this control group.

    Parameters

    index*
    number
    Index of the control.
    * Required

    Returns

    typedescription
    string The ID of the control or null if it doesn’t exist.

    getNumberOfControls()

    Returns the number of controls in this control group.

    Returns

    typedescription
    number The number of controls.

    setCollapsed(collapsed)

    Sets the collapsed state of this control group. Iterates over the child controls and calls child.setCollapsed(collapsed).

    Parameters

    collapsed*
    boolean
    The collapsed value to set.
    * Required

    Returns

    typedescription
    boolean True if at least one collapsible child’s state changes.

    getId()

    Gets this control’s ID.

    Returns

    typedescription
    string The control’s ID.

    setVisible(visible)

    Sets the visibility of this control.

    Parameters

    visible*
    boolean
    The visibility value to set.
    * Required

    Returns

    typedescription
    boolean True if the control’s visibility changed.

    isVisible()

    Gets the visibility of this control.

    Returns

    typedescription
    boolean True if the this control is visible.

    setToolTip(toolTipText)

    Sets the tooltip text for this control.

    Parameters

    toolTipText*
    string
    The text for the tooltip.
    * Required

    Returns

    typedescription
    boolean True if the tooltip was successfully set.

    getToolTip()

    Returns the tooltip text for this control.

    Returns

    typedescription
    string The tooltip text. Null if it’s not set.

    isCollapsed()

    Gets the collapsed state of this control.

    Returns

    typedescription
    boolean True if this control is collapsed.

    isCollapsible()

    Returns whether or not this control is collapsible.

    Returns

    typedescription
    boolean True if this control can be collapsed.

    addClass(cssClass)

    Adds a CSS class to this control.

    Parameters

    cssClass*
    string
    The name of the CSS class.
    * Required

    removeClass(cssClass)

    Removes a CSS class from this control.

    Parameters

    cssClass*
    string
    The name of the CSS class.
    * Required

    getPosition()

    Returns the position of this control relative to the canvas.

    Returns

    typedescription
    object The top and left values of the toolbar.

    getDimensions()

    Returns the dimensions of this control.

    Returns

    typedescription
    object The width and height of the toolbar.

    setDisplay(value)

    Sets the CSS display style value.

    Parameters

    value*
    string
    CSS display value
    * Required

    Events

    CONTROL_ADDED

    Event fired a control is added to the control group.

    Properties

    control
    string
    The control that was added.
    index
    number
    The index at which the control was added.

    CONTROL_REMOVED

    Event fired when a control is removed from the control group.

    Properties

    control
    string
    The control that was removed.
    index
    number
    The index at which the control was removed.

    SIZE_CHANGED

    Event fired when the size of the control group changes.

    Properties

    childEvent
    object
    The event that the child fired.

    VISIBILITY_CHANGED

    Event fired when the visibility of the control changes.

    Properties

    controlId
    string
    The ID of the control that fired this event.
    isVisible
    boolean
    True if the control is now visible.

    COLLAPSED_CHANGED

    Event fired when the collapsed state of the control changes.

    Properties

    controlId
    string
    The ID of the control that fired this event.
    isCollapsed
    boolean
    True if the control is now collapsed.
     
    ______
    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.