Property OrderDimensionY
OrderDimensionY
Depth of the object as it will appear in the supplier order (in the object catalog measurement units).
Declaration
public double OrderDimensionY { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
This value is always equal to 0 if the PC0 parameter is present in the block script; it’s equal to the corresponding "catalog dimension" if the PCL, PCP or PCH parameter is present in the block script; it’s equal to the corresponding "scene dimension" if the PCLV, PCPV or PCHV parameter is present in the block script.
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;
}