Interface MeasurementAPI

These functions allow the creation of Measurements.


// Get the context
const context : ContextAPI = webvis.getContext();

// Define a point target
const pointTarget : webvis.MeasurementTarget<MeasurementTargetClass.POINT> =
class: webvis.MeasurementTargetClass.POINT,
value: [ 0, 0, 0 ]

// Define a plane target
const planeTarget : webvis.MeasurementTarget<MeasurementTargetClass.PLANE> =
class: webvis.MeasurementTargetClass.PLANE,
value: [ 1, 0, 0, 1 ]

// Create a new single Measurement
const singleMeasurementID : number = context.createMeasurement(
[ pointTarget ],
{ enabled: true }

// Create a double Measurement between a point and a plane
const doubleMeasurementID : number = context.createMeasurement(
[ pointTarget, planeTarget ],
{ enabled: true }



  • Changes one or more properties of a Measurement with the specified id.


    • measurementID: number

      The id of the Measurement you want to change.

    • properties: MeasurementProperties

      The properties of the Measurement you want change.

    Returns MeasurementProperties

    An Object with the changed Properties.

  • Creates a new Measurement.

    Type Parameters


    Returns number

    The ID of the created Measurement.

  • Returns number[]

    The IDs of all available Measurements.

  • Removes the Measurement from the scene and all related Snapshots.


    • measurementID: number
    • Optional safe: boolean

      Performs a safe remove which interrupt the removal process if the Measurement is part of one or more Snapshots.

    Returns RemoveState

  • Returns the MeasurementProperties for the specified Measurement id.


    • measurementID: number

      The id of the Measurement you want to request the data for.

    Returns Promise<MeasurementProperties>

    The requested Measurement properties.

Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: