KitchenDraw SDK 2
Show / Hide Table of Contents

Method GetDistanceFromObject

GetDistanceFromObject(bool, Object, bool, ViewType)

Returns the distance in millimeters between current and anouther object of the scene in specified view type.

Declaration
public double GetDistanceFromObject(bool withChildren, Scene.Object objectFrom, bool withChildrenFrom, Scene.ViewType viewType)
Parameters
Type Name Description
bool withChildren

Defines whether the components of the current object will be taken into account in the distance calculation.

Scene.Object objectFrom

An object to calculate distance from.

bool withChildrenFrom

Defines whether the components of the objectFrom object will be taken into account in the distance calculation.

Scene.ViewType viewType

View type in which distance is calculated (altitude for example is not considered when the distance is calculated for the Top view type).

Returns
Type Description
double

Distance in millimiters. Double.NaN if the objects overlap.

Remarks

You can use UnitConvert(UnitType, UnitType, double) to convert the result in other units.

In this article
Back to top Generated by DocFX