MeasureMarkup

class Communicator.Markup.Measure.MeasureMarkup()

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

Methods

forJson()

getClassName()

getMeasurementText()

getMeasurementValue()

getName()

getUnitMultiplier()

getVisibility()

hit()

hitWithTolerance()

onDeselect()

onSelect()

remove()

setMeasurementText()

setName()

setVisibility()

toJson()


Methods

forJson

Communicator.Markup.Measure.MeasureMarkup.forJson()

Note

forJson is deprecated: Use toJson instead.

Return type

Object

getClassName

Communicator.Markup.Measure.MeasureMarkup.getClassName()

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

Return type

string

Returns

fully qualified class name

getMeasurementText

Communicator.Markup.Measure.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

Communicator.Markup.Measure.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.

Return type

number

Returns

the measurement value

getName

Communicator.Markup.Measure.MeasureMarkup.getName()

Gets the name of this measurement.

Return type

string

Returns

the measurement name

getUnitMultiplier

Communicator.Markup.Measure.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

Communicator.Markup.Measure.MeasureMarkup.getVisibility()
Return type

boolean

hit

Communicator.Markup.Measure.MeasureMarkup.hit(point)

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

Arguments
  • point (Communicator.Point2()) – position in window where the hit test is being performed.

Return type

boolean

Returns

boolean value indicating whether this item was picked

hitWithTolerance

Communicator.Markup.Measure.MeasureMarkup.hitWithTolerance(point, pickTolerance)

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

Arguments
  • point (Communicator.Point2()) – position in window where the hit test is being performed.

  • pickTolerance (number()) – amount of tolerance allowed for a hit in pixels.

Return type

boolean

Returns

boolean value indicating whether this item was picked

onDeselect

Communicator.Markup.Measure.MeasureMarkup.onDeselect()

Called when this markup item is deselected by the system

Return type

void

onSelect

Communicator.Markup.Measure.MeasureMarkup.onSelect()

Called when this markup item is selected by the system.

Return type

void

remove

Communicator.Markup.Measure.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

Communicator.Markup.Measure.MeasureMarkup.setMeasurementText(measurementText)

Sets the measurement text that is rendered with this measurement.

Arguments
  • measurementText (string()) – the text to render with this measurement

Return type

void

setName

Communicator.Markup.Measure.MeasureMarkup.setName(name)

Sets the name of this measurement

Arguments
  • name (string()) – the name to set

Return type

void

setVisibility

Communicator.Markup.Measure.MeasureMarkup.setVisibility(visibility)
Arguments
  • visibility (boolean()) –

Return type

void

toJson

Communicator.Markup.Measure.MeasureMarkup.toJson()

Creates an object ready for JSON serialization.

Return type

Object

Returns

The prepared object.