Request

Response

    Autodesk.Viewing.Extensions

    MeasureExtension

    new MeasureExtension()

    Provides UI controls to perform distance and angle measurements for 2D and 3D models.

    The extension id is: Autodesk.Measure

    Examples

    viewer.loadExtension('Autodesk.Measure')
    

    Methods

    load()

    Load the measure extension.

    Returns

    typedescription
    boolean True if measure extension is loaded successfully.

    unload()

    Unload the measure extension.

    Returns

    typedescription
    boolean True if measure extension is unloaded successfully.

    activate(mode)

    Activates the tool and UI to start measuring.

    Parameters

    mode
    string
    Either ‘distance’, ‘angle’, ‘area’ (2D only) or ‘calibrate’. Default is ‘distance’.

    deactivate()

    Deactivates measuring tool and UI.

    Returns

    typedescription
    boolean

    deleteCurrentMeasurement()

    Deletes the selected measurement.