# MeasureMarkup

class Operators.Markup.Measure.MeasureMarkup()

  Base class for Measure Markup. It should not be used directly.

Methods

- `getClassName()`

- `getMeasurementText()`

- `getMeasurementValue()`

- `getName()`

- `getUnitMultiplier()`

- `getVisibility()`

- `hit()`

- `hitWithTolerance()`

- `isMarkupValid()`

- `onDeselect()`

- `onSelect()`

- `remove()`

- `setMeasurementText()`

- `setName()`

- `setVisibility()`

- `toJson()`

## Methods

### getClassName

MeasureMarkup.getClassName()

  Gets the fully qualified class name for this markup item. E.g. “Communicator.Markup.Redline.RedlineCircle”

  Returns

    fully qualified class name

  Return type

    string

### getMeasurementText

MeasureMarkup.getMeasurementText()

  Gets the text for this measurement. By default this will contain the measurement value and units for the model in the cases where the measurement is a distance. In other cases it will contain the angle in degrees.

  Return type

    string

### getMeasurementValue

MeasureMarkup.getMeasurementValue()

  Returns the unit agnostic value for this measurement. In the case where this value represents distance, use [[getUnitMultiplier]] to determine the measurement units. In other cases, this value will be the angle measurement in degrees.

  Returns

    the measurement value

  Return type

    number

### getName

MeasureMarkup.getName()

  Gets the name of this measurement.

  Returns

    the measurement name

  Return type

    string

### getUnitMultiplier

MeasureMarkup.getUnitMultiplier()

  Returns the unit multiplier incorporated into the measurement value. This number is a multiplier of millimeters (for example inches will be `25.4`). The default value is `1.0`.

  Return type

    number

### getVisibility

MeasureMarkup.getVisibility()
  Return type

    boolean

### hit

MeasureMarkup.hit(_point, _view)
  Arguments

    - _point (`Point2()`) – None

    - _view (`View()`) – None

  Called when a hit test is performed on this markup item.

  Returns

    boolean value indicating whether this item was picked

  Return type

    boolean

### hitWithTolerance

MeasureMarkup.hitWithTolerance(_point, _view, _pickTolerance)
  Arguments

    - _point (`Point2()`) – None

    - _view (`View()`) – None

    - _pickTolerance (`number()`) – None

  Called when a hit test is performed on this markup item.

  Returns

    boolean value indicating whether this item was picked

  Return type

    boolean

### isMarkupValid

MeasureMarkup.isMarkupValid()

  Returns whether the measurement markup is valid. Override in subclasses when needed.

  Return type

    boolean

### onDeselect

MeasureMarkup.onDeselect()

  Called when this markup item is deselected by the system

  Return type

    void

### onSelect

MeasureMarkup.onSelect()

  Called when this markup item is selected by the system.

  Return type

    void

### remove

MeasureMarkup.remove()

  Called when the MarkupItem is removed from the system. Any cleanup that needs to be done should be performed in this method.

  Return type

    void

### setMeasurementText

MeasureMarkup.setMeasurementText(measurementText)
  Arguments

    - measurementText (`string()`) – the text to render with this measurement

  Sets the measurement text that is rendered with this measurement.

  Return type

    void

### setName

MeasureMarkup.setName(name)
  Arguments

    - name (`string()`) – the name to set

  Sets the name of this measurement

  Return type

    void

### setVisibility

MeasureMarkup.setVisibility(visibility)
  Arguments

    - visibility (`boolean()`) – None

  Return type

    void

### toJson

MeasureMarkup.toJson()

  Creates an object ready for JSON serialization.

  Returns

    The prepared object.

  Return type

    object