GetUtilizedPart
Name
GetUtilizedPart
When to use it
During the OnFinish event.
Prototype
GetUtilizedPart(
SheetIndex: long /*[in]*/,
PieceIndex: long /*[in]*/,
Type: long /*[out]*/,
NumberOfVertices: long /*[out]*/
CenterX : double /*[out]*/,
CenterY : double /*[out]*/,
Radius : double /*[out]*/,
RotationAngle : double /*[out]*/,
Mirrored: long/*[out]*/,
NumberOfHoles: long/*[out]*/,
OffsetX : double /*[out]*/,
OffsetY : double /*[out]*/,
StockIndex: long /*[out]*/,
PartIndex: long /*[out]*/,
StockUserDefinedData: long /*[out]*/,
PartUserDefinedData: long /*[out]*/
);
Explanations
This method returns information about an utilized piece. For finding information about the position of polygon's vertices you have to call GetVertexOfUtilizedPart method.
The number of utilized pieces in one sheet is obtained using the property NumberOfUtilizedParts.
Parameters
SheetIndex - Is the index of the layout (sheet) whose information is needed. SheetIndex must be between 0 and TotalNumberOfUtilizedStock - 1.
PieceIndex - the index of the piece whose information are extracted. This number is in range [0...NumberOfUtilizedParts - 1].
Type - 0 for polygons and 1 for circles.
NumberOfVertices - the number of vertices of the part. 0 if the part is a circle.
CenterX, CenterY, Radius - the new coordinates of the circle if the current piece is a circle.
RotationAngle - get the angle with which the piece was rotated. 0 means no rotation. Angle is given in degrees.
Mirrored- specify whether the piece was mirrored (flipped) or not. Mirroring is performed by using Oy as reference (that is x = 10 becomes x = -10).
NumberOfHoles - the number of holes of the part.
OffsetX, OffsetY - How much the piece was moved horizontally and vertically compared to the original position..
StockIndex - The index of the Repository piece where the cut is performed. StockIndex is between 0 and NumberOfStockPieces - 1.
PartIndex - is the index of the current utilized piece in the array of the pieces given as input. This number is in range [0...NumberOfParts - 1]. Using this field you may easily locate the current utilized piece in the input array.
StockUserDefinedData - - an user defined value which was set by SetStock method.
PartUserDefinedData - an user defined value which was set by SetPart method.
Next to call: GetVertexOfUtilizedPart, GetUtilizedPartHole
See also