GetUtilizedDemandPiece
Name
GetUtilizedDemandPiece
When to use it
During the OnFinish event.
Prototype
HRESULT GetUtilizedDemandPiece(
SheetIndex: long /*[in]*/,
PieceIndex: long /*[in]*/,
TopX: long /*[out]*/,
TopY: long /*[out]*/,
BottomX: long /*[out]*/,
BottomY: long /*[out]*/,
Rotated: long /*[out]*/,
RepositoryIndex: long /*[out]*/,
DemandIndex: long /*[out]*/,
RepositoryExternalID: long /*[out]*/,
DemandExternalID: long /*[out]*/
);
Explanations
This method returns information about an utilized piece.
The number of utilized pieces in one sheet is obtained using the property NumberOfUtilizedDemandPieces.
Parameters
SheetIndex - Is the index of the layout (sheet) whose information is needed. SheetIndex must be between 0 and TotalNumberOfUtilizedRepositoryPieces - 1.
PieceIndex - the index of the piece whose information are extracted. This number is in range [0...NumberOfUtilizedDemandPieces - 1].
TopX, TopY, BottomX and BottomY are the coordinates of the top-left and bottom-right corners of the current piece.
Rotated - set to 1 if the piece is rotated compared to the original input. Set to 0 otherwise.
RepositoryIndex - The index of the Repository piece where the cut is performed. RepositoryIndex is between 0 and NumberOfRepositoryPieces - 1.
DemandIndex - is the index of the current utilized piece in the array of the pieces given as input. This number is in range [0...NumberOfDemandPieces - 1]. Using this field you may easily locate the current utilized piece in the input array.
RepositoryExternalID - an user defined value which was set by SetRepositoryPiece method.
DemandExternalID - an user defined value which was set by SetDemandPiece method.
See Also:
DemandPieceUtilized, GetUtilizedRepositoryPiece, NumberOfUtilizedDemandPieces, SetDemandPiece, GetDemandPiece, OnFinish.