RulerIds
Get a list of all ruler IDs.
Python C++ C# VS Server
Python
BwApi.RulerIds(garmentId)
C++
BwApiRulerIds(garmentId);
C#
BwApi.RulerIds(garmentId);
VS Server
{
"id": "API processing order number",
"function": "RulerIds",
"params": {
"garmentId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
Out | rulerIds | List of all ruler IDs (see BwApiVectorInt type) |
Error/success code (see BwApiErrorCodes enum).
RulerCreate
Create a new ruler between elements.
Python C++ C# VS Server
Python
BwApi.RulerCreate(garmentId, name, elements)
C++
BwApiRulerCreate(garmentId, name, elements);
C#
BwApi.RulerCreate(garmentId, name, elements);
VS Server
{
"id": "API processing order number",
"function": "RulerCreate",
"params": {
"garmentId": "value",
"name": "value",
"elements": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | name | Ruler name |
In | elements | Array of elements |
Out | rulerId | The ID of the newly created ruler |
Error/success code (see BwApiErrorCodes enum).
RulerNameGet
Get a ruler's name.
Python C++ C# VS Server
Python
BwApi.RulerNameGet(garmentId, rulerId)
C++
BwApiRulerNameGet(garmentId, rulerId);
C#
BwApi.RulerNameGet(garmentId, rulerId);
VS Server
{
"id": "API processing order number",
"function": "RulerNameGet",
"params": {
"garmentId": "value",
"rulerId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | rulerId | Existing ruler ID |
Out | name | Ruler name |
Error/success code (see BwApiErrorCodes enum).
RulerLengthGet
Get the length of a rule for a given size.
Python C++ C# VS Server
Python
BwApi.RulerLengthGet(garmentId, rulerId, sizeId)
C++
BwApiRulerLengthGet(garmentId, rulerId, sizeId);
C#
BwApi.RulerLengthGet(garmentId, rulerId, sizeId);
VS Server
{
"id": "API processing order number",
"function": "RulerLengthGet",
"params": {
"garmentId": "value",
"rulerId": "value",
"sizeId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | rulerId | Existing ruler ID |
In | sizeId | Existing size ID (see BwApiGarmentSizeIds and BwApiSizeCurrentGet you can also pass -1 for current size) |
Out | length | Ruler's total length |
Error/success code (see BwApiErrorCodes enum).
Ruler3DLengthGet
Get the 3D length for the given ruler ID and size ID.
Python C++ C# VS Server
Python
BwApi.Ruler3DLengthGet(garmentId, rulerId, sizeId)
C++
BwApiRuler3DLengthGet(garmentId, rulerId, sizeId);
C#
BwApi.Ruler3DLengthGet(garmentId, rulerId, sizeId);
VS Server
{
"id": "API processing order number",
"function": "Ruler3DLengthGet",
"params": {
"garmentId": "value",
"rulerId": "value",
"sizeId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | rulerId | Existing ruler ID |
In | sizeId | Existing size ID (see BwApiGarmentSizeIds and BwApiSizeCurrentGet you can also pass - 1 for current size) |
Out | length | Ruler's total length if exist otherwise -1 |
Error/success code (see BwApiErrorCodes enum).
The 3D length is available when a snapshot exists.
If a snapshot is not available for the input size ID the result will be calculated from the current size.