DriveWorks Pro 17: PreviewGetDistance [send feedback...]

PreviewGetDistance

This function returns a table containing the distance on each axis, and the direct distance, between two positions.

Syntax

PreviewGetDistance( [Position 1], [Position 2], [Decimal Places])

Where:

Position 1 is a pipebar delimited list representing the first position (X|Y|Z).

Position 2 is a pipebar delimited list representing the second position (X|Y|Z).

Decimal Places (optional) is the number of decimal places to round the calculated distance to.

Examples

RuleResult
PreviewGetDistance("10|20|30","100|-20|30",5)Will return a table array as below:

{"Measurement","Value";"Distance",98.48858;"X Distance",-90;"Y Distance",40;"Z Distance",0}

The Distance value will be rounded to the 5 decimal places specified in the rule.
PreviewGetDistance(DWConstantFirstClick, DWConstantSecondClick, 5)Will return a table array as below:

{"Measurement","Value";"Distance",98.48858;"X Distance",-90;"Y Distance",40;"Z Distance",0}

The Distance value will be rounded to the 5 decimal places specified in the rule.

The values of DWConstantFirstClick and DWConstantSecondClick are the same as in the first example in this table.

Result As Table

When viewed in a table the result will look like:

MeasurementValue
Distance98.48858
X Distance-90
Y Distance40
Z Distance0

Table of Contents