Property OrderDimensionZ
OrderDimensionZ
Height of the object as it will appear in the supplier order (in the object catalog measurement units).
Declaration
public double OrderDimensionZ { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
This value is always equal to 0 if the HC0 parameter is present in the block script; it’s equal to the corresponding "catalogue dimension" if the HCL, HCP or HCH parameter is present in the block script; it’s equal to the corresponding "scene dimension" if the HCLV, HCPV or HCHV 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;
}