KitchenDraw SDK 2
Show / Hide Table of Contents

Property DimensionY

DimensionY

Depth of the object (in the object measurement units).

Declaration
public double DimensionY { get; set; }
Property Value
Type Description
double
Remarks

You can use UnitConvert(UnitType, UnitType, double) method to convert this value to other measurement units if necessary.

Examples

The following example shows how to convert an object's dimension from catalog units to scene units.

public bool OnObjectPlaceAfter(int unused)
{
    var appli = new Appli();
    Scene scene = appli.Scene;

    Scene.Object placedObject = appli.CallParamsInfo.ActiveObject;

    double objectDimensionInSceneUnits
        = scene.UnitConvertFrom(
            placedObject.Unit, placedObject.DimensionX);

    // The following code does exact the same conversion as previous
    objectDimensionInSceneUnits = Appli.UnitConvert(
            placedObject.Unit, scene.Unit, placedObject.DimensionX);

    MessageBox.Show("Object's dimension in scene unit is: "
        + objectDimensionInSceneUnits.ToString()
        + scene.Unit.ToString());

    return true;
}
In this article
Back to top Generated by DocFX