Skip to main content

Size

Size

This file contains size and grading, you can add size, create grade rule etc...

BwApiSizeAdd

Create a new garment size.

Python

BwApi.SizeAdd(garmentId, sizeName, afterSizeId)

C++

BwApiSizeAdd(garmentId, sizeName, afterSizeId, newSizeId);

C#

BwApi.SizeAdd(garmentId, sizeName, afterSizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

sizeName

The name of the new size.

In

afterSizeId

Add the new size after this size ID, -1 to add as first size.

Out

newSizeId

The ID of the newely created size.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeDelete

Delete an existing size.

Python

BwApi.SizeDelete(garmentId, sizeId)

C++

BwApiSizeDelete(garmentId, sizeId);

C#

BwApi.SizeDelete(garmentId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

sizeId

The size ID to delete.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeCurrentGet

Get the current garment size.

Python

BwApi.SizeCurrentGet(garmentId)

C++

BwApiSizeCurrentGet(garmentId, sizeId);

C#

BwApi.SizeCurrentGet(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

Out

sizeId

Get the current size ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeCurrentSet

Set the current garment size.

Python

BwApi.SizeCurrentSet(garmentId, sizeId)

C++

BwApiSizeCurrentSet(garmentId, sizeId);

C#

BwApi.SizeCurrentSet(garmentId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

sizeId

Set size ID as the current size ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeNameGet

Get a size name.

Python

BwApi.SizeNameGet(garmentId, sizeId)

C++

BwApiSizeNameGet(garmentId, sizeId, sizeName);

C#

BwApi.SizeNameGet(garmentId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

sizeId

The ID of specific size.

Out

sizeName

The name of the size.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeNameSet

Set a size name.

Python

BwApi.SizeNameSet(garmentId, sizeId, sizeName)

C++

BwApiSizeNameSet(garmentId, sizeId, sizeName);

C#

BwApi.SizeNameSet(garmentId, sizeId, sizeName);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

sizeId

The ID of specific size.

In

sizeName

The name of the size.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeBaseGet

Get the base size.

Python

BwApi.SizeBaseGet(garmentId)

C++

BwApiSizeBaseGet(garmentId, sizeId);

C#

BwApi.SizeBaseGet(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

Out

sizeId

Base size ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiSizeBaseSet

Set the base size.

Python

BwApi.SizeBaseSet(garmentId, sizeId)

C++

BwApiSizeBaseSet(garmentId, sizeId);

C#

BwApi.SizeBaseSet(garmentId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

sizeId

Base size ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiGradeRuleAdd

Add a grade rule.

Python

BwApi.GradeRuleAdd(garmentId)

C++

BwApiGradeRuleAdd(garmentId, gradeId);

C#

BwApi.GradeRuleAdd(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

Out

gradeId

New grade ID.

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiGradeRuleGet

Get a grade rule.

Python

BwApi.GradeRuleGet(garmentId, gradeId, sizeId)

C++

BwApiGradeRuleGet(garmentId, gradeId, sizeId, offsetFromBase);

C#

BwApi.GradeRuleGet(garmentId, gradeId, sizeId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

gradeId

Existing grade ID.

In

sizeId

Existing size ID.

Out

offsetFromBase

Get the offset from the base size (see BwApiCoordinatesXY).

Returns: Error/success code (see BwApiErrorCodes enum).

---

BwApiGradeRuleSet

Set a grade rule.

Python

BwApi.GradeRuleSet(garmentId, gradeId, sizeId, offsetFromBase)

C++

BwApiGradeRuleSet(garmentId, gradeId, sizeId, offsetFromBase);

C#

BwApi.GradeRuleSet(garmentId, gradeId, sizeId, offsetFromBase);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID.

In

gradeId

Existing grade ID.

In

sizeId

Existing size ID.

In

offsetFromBase

Set the offset from the base size (see BwApiCoordinatesXY).

Returns: Error/success code (see BwApiErrorCodes enum).

---

Did this answer your question?