Property OrderDimensionX
OrderDimensionX
Width of the object as it will appear in the supplier order (in the object catalog measurement units).
Declaration
public double OrderDimensionX { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
This value is always equal to 0 if the LC0 parameter is present in the block script; it’s equal to the corresponding "catalog dimension" if the LCL, LCP or LCH parameter is present in the block script; it’s equal to the corresponding "scene dimension" if the LCLV, LCPV or LCHV 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;
}