GetVertexOfUtilizedPartHole
Name
GetVertexOfUtilizedPartHole
When to use it
During the OnFinish event.
Prototype
GetVertexOfUtilizedPart(
SheetIndex: long /*[in]*/,
PieceIndex: long /*[in]*/,
HoleIndex: long /*[in]*/,
VertexIndex: long /*[in]*/,
IsArc: long /*[out]*/,
X: double /*[out]*/,
Y: double /*[out]*/,
CenterX: double /*[out]*/,
CenterY: double /*[out]*/,
Direction: long /*[out]*/,
StockIndex: long /*[out]*/,
PartIndex: long /*[out]*/,
StockExternalID: long /*[out]*/,
PartExternalID: long /*[out]*/,
HoleExternalID: long /*[out]*/,
VertexUserDefinedData: long /*[out]*/,
);
Explanations
Returns the position of a hole of a part placed on a sheet.
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].
HoleIndex - the index of the hole whose information are extracted. The number of holes was set using SetPart method.
VertexIndex - the index of the vertex whose information is extracted.
IsArc - returns 1 if the curve connecting VertexIndex with the next vertex is arc. It returns 0 otherwise.
X, Y - the coordinates where the vertex is located on the sheet.
CenterX, CenterY - the coordinates of the center of the arc (only if IsArc is 1). If IsArc is 0, the values are undefined.
Direction - the arc direction (0 - counter clockwise, 1 - clockwise). Only if IsArc is 1. If IsArc is 0, the value is undefined.
StockIndex - The index of the stock 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.
StockExternalID - - an user defined value which was set by SetStock method.
PartExternalID - an user defined value which was set by SetPart method.
HoleExternalID - an user defined value which was set by SetPartHole method.
VertexUserDefinedData - an user defined value set by SetPartHoleVertex method.
See also
UtilizedPart, GetUtilizedPart, GetVertexOfUtilizedPart, GetUtilizedStock, SetPart, SetPartHole, SetPartHoleVertex, SetPartHoleArc, OnFinish.