Skip to main content

Garment

GarmentCreate GarmentOpen GarmentImport GarmentS...

Updated over 2 months ago

GarmentCreate

Creates a new empty garment.

Python C++ C#

Python

BwApi.GarmentCreate(name)

C++

BwApiGarmentCreate(name);

C#

BwApi.GarmentCreate(name);

Parameters

Param

Variable

Description

In

name

The name of the new garment

Out

garmentIdOut

The created garment ID

Error/success code (see BwApiErrorCodes enum).

This function prompts the user to closes any open garments.

GarmentOpen

Open a garment from a file (.vsp, .vsgx, .bw or .dxf).

Python C++ C#

Python

BwApi.GarmentOpen(path)

C++

BwApiGarmentOpen(path);

C#

BwApi.GarmentOpen(path);

Parameters

Param

Variable

Description

In

path

Full path to the garment file

Error/success code (see BwApiErrorCodes enum).

GarmentImport

Open a garment from a file with settings (.vsp, .dxf).

Python C++ C# VS Server

Python

BwApi.GarmentImport(path, settings)

C++

BwApiGarmentImport(path, settings);

C#

BwApi.GarmentImport(path, settings);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentImport",
	"params": {
		"path": {
			"download_data": {
				"url": "URL",
				"sha256": "SHA256",
				"name": "NAME"
			}
		},
		"settings": "value"
	}
}    

Parameters

Param

Variable

Description

In

path

Full path to the garment vsp or dxf file

In

settings

Settings for open (see schema/garment/import_settings.json)

Error/success code (see BwApiErrorCodes enum).

GarmentSave

Save the garment changes to the current used file.

Python C++ C# VS Server

Python

BwApi.GarmentSave(garmentId)

C++

BwApiGarmentSave(garmentId);

C#

BwApi.GarmentSave(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentSave",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

If the garment was not saved before calling this function, it will fail.

GarmentSaveAs

Save the garment to file (.bw).

Python C++ C#

Python

BwApi.GarmentSaveAs(garmentId, path)

C++

BwApiGarmentSaveAs(garmentId, path);

C#

BwApi.GarmentSaveAs(garmentId, path);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

path

Full path to the garment file to save

Error/success code (see BwApiErrorCodes enum).

If the path already exists a message will be displayed to user.

Warning: Saving garment to file will re-load the new garment automatically, this will generate a new garment ID!

GarmentSaveAsFinalDesign

Save the garment as a final design (.bw, .vsgx).

Python C++ C# VS Server

Python

BwApi.GarmentSaveAsFinalDesign(garmentId, path)

C++

BwApiGarmentSaveAsFinalDesign(garmentId, path);

C#

BwApi.GarmentSaveAsFinalDesign(garmentId, path);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentSaveAsFinalDesign",
	"params": {
		"garmentId": "value",
		"path": {
			"download_data": {
				"url": "URL",
				"sha256": "SHA256",
				"name": "NAME"
			}
		}
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

path

Full path to the garment file to save

Error/success code (see BwApiErrorCodes enum).

Relevant only for SmartDesign templates.

Warning: Saving garment to file will re-load the new garment automatically, this will generate a new garment ID!

GarmentExport

Python C++ C#

Python

BwApi.GarmentExport()

C++

BwApiGarmentExport();

C#

BwApi.GarmentExport();

GarmentExportEx_v2

Export the garment to file (.dxf).

Python C++ C#

Python

BwApi.GarmentExportEx_v2(garmentId, path, settings)

C++

BwApiGarmentExportEx_v2(garmentId, path, settings);

C#

BwApi.GarmentExportEx_v2(garmentId, path, settings);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

path

Full path to save the garment (extension must be .dxf)

In

settings

Settings for export (see schema/garment/export_settings.json). By default (when using BwApiGarmentExport) this parameter will be 1

Error/success code (see BwApiErrorCodes enum).

GarmentMerge

Merge the existing garment with an external .dxf file.

Python C++ C# VS Server

Python

BwApi.GarmentMerge(garmentId, path)

C++

BwApiGarmentMerge(garmentId, path);

C#

BwApi.GarmentMerge(garmentId, path);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentMerge",
	"params": {
		"garmentId": "value",
		"path": {
			"download_data": {
				"url": "URL",
				"sha256": "SHA256",
				"name": "NAME"
			}
		}
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

path

Full path to .dxf file

Error/success code (see BwApiErrorCodes enum).

GarmentPathGet

Get the current garment working directory.

Python C++ C#

Python

BwApi.GarmentPathGet(garmentId)

C++

BwApiGarmentPathGet(garmentId);

C#

BwApi.GarmentPathGet(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

path

The garment's path

Error/success code (see BwApiErrorCodes enum).

GarmentClose

Close the existing garment.

Python C++ C#

Python

BwApi.GarmentClose(garmentId, discardChanges)

C++

BwApiGarmentClose(garmentId, discardChanges);

C#

BwApi.GarmentClose(garmentId, discardChanges);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

discardChanges

0 - Prompt message to user whether to discard or save changes if garment was changed from last save. 1 - Discard pending changes without prompting anything to the user

Error/success code (see BwApiErrorCodes enum).

GarmentCloseEx

Close existing garment

Python C++ C#

Python

BwApi.GarmentCloseEx(garmentId, closeInfo)

C++

BwApiGarmentCloseEx(garmentId, closeInfo);

C#

BwApi.GarmentCloseEx(garmentId, closeInfo);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

closeInfo

Garment close info (see schema/garment_close_info.json)

Error/success code (see BwApiErrorCodes enum).

GarmentId

Gets the ID of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentId()

C++

BwApiGarmentId();

C#

BwApi.GarmentId();

VS Server

{
	"id": "API processing order number",
	"function": "GarmentId",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

garmentIdOut

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

GarmentNameGet

Get the name of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentNameGet(garmentId)

C++

BwApiGarmentNameGet(garmentId);

C#

BwApi.GarmentNameGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentNameGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

name

The garment name

Error/success code (see BwApiErrorCodes enum).

GarmentNameSet

Set the name of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentNameSet(garmentId, name)

C++

BwApiGarmentNameSet(garmentId, name);

C#

BwApi.GarmentNameSet(garmentId, name);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentNameSet",
	"params": {
		"garmentId": "value",
		"name": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

name

The garment name

Error/success code (see BwApiErrorCodes enum).

GarmentShapeIds

Gets the shape IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentShapeIds(garmentId)

C++

BwApiGarmentShapeIds(garmentId);

C#

BwApi.GarmentShapeIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentShapeIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

shapeIds

Array of int containig the shape IDs

Error/success code (see BwApiErrorCodes enum).

GarmentZipperIds

Gets the zipper IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentZipperIds(garmentId)

C++

BwApiGarmentZipperIds(garmentId);

C#

BwApi.GarmentZipperIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentZipperIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

zipperIds

Array of int containing the zipper IDs

Error/success code (see BwApiErrorCodes enum).

GarmentButtonIds

Gets the button IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentButtonIds(garmentId)

C++

BwApiGarmentButtonIds(garmentId);

C#

BwApi.GarmentButtonIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentButtonIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

buttonIds

Array of int containing the button IDs

Error/success code (see BwApiErrorCodes enum).

GarmentClusterIds

Gets the cluster IDs of the current VStitcher active garment.

Python C++ C# VS Server

Python

BwApi.GarmentClusterIds(garmentId)

C++

BwApiGarmentClusterIds(garmentId);

C#

BwApi.GarmentClusterIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentClusterIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

clusterIds

Array of int containing the cluster IDs

Error/success code (see BwApiErrorCodes enum).

GarmentStitchIds

Gets the stitch IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentStitchIds(garmentId)

C++

BwApiGarmentStitchIds(garmentId);

C#

BwApi.GarmentStitchIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentStitchIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

stitchIds

Array of int containing the stitch IDs

Error/success code (see BwApiErrorCodes enum).

GarmentSizeIds

Gets the size IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentSizeIds(garmentId)

C++

BwApiGarmentSizeIds(garmentId);

C#

BwApi.GarmentSizeIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentSizeIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Axisting garment ID

Out

sizeIds

Array of int containing the size IDs

Error/success code (see BwApiErrorCodes enum).

GarmentColorwayIds

Gets the colorway IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentColorwayIds(garmentId)

C++

BwApiGarmentColorwayIds(garmentId);

C#

BwApi.GarmentColorwayIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentColorwayIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

colorwayIds

Array of int containing the colorway IDs

Error/success code (see BwApiErrorCodes enum).

GarmentColorwayReorderIds

Sets the order of the colorway for the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentColorwayReorderIds(garmentId)

C++

BwApiGarmentColorwayReorderIds(garmentId);

C#

BwApi.GarmentColorwayReorderIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentColorwayReorderIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

colorwayIds

Array of int containing the colorway IDs

Error/success code (see BwApiErrorCodes enum).

The array of the colorway IDs must be a permutation of the current garment colorway IDs.

GarmentWorkspaceGet

Gets the current workspace name.

Python C++ C# VS Server

Python

BwApi.GarmentWorkspaceGet(garmentId)

C++

BwApiGarmentWorkspaceGet(garmentId);

C#

BwApi.GarmentWorkspaceGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentWorkspaceGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

workspaceName

Current workspace name

Error/success code (see BwApiErrorCodes enum).

GarmentWorkspaceSet

Sets the current workspace.

Python C++ C# VS Server

Python

BwApi.GarmentWorkspaceSet(garmentId, workspaceName)

C++

BwApiGarmentWorkspaceSet(garmentId, workspaceName);

C#

BwApi.GarmentWorkspaceSet(garmentId, workspaceName);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentWorkspaceSet",
	"params": {
		"garmentId": "value",
		"workspaceName": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

workspaceName

Workspace name - "home"/"colorways"/"animation"

Error/success code (see BwApiErrorCodes enum).

GarmentLayerGet

Gets the layer of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentLayerGet(garmentId)

C++

BwApiGarmentLayerGet(garmentId);

C#

BwApi.GarmentLayerGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentLayerGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

garmentLayer

Garment layer ID (see garmentLayers enum)

Error/success code (see BwApiErrorCodes enum).

GarmentLayerSet

Sets the layer of the current VStitcher active garment.

Python C++ C# VS Server

Python

BwApi.GarmentLayerSet(garmentId, garmentLayer)

C++

BwApiGarmentLayerSet(garmentId, garmentLayer);

C#

BwApi.GarmentLayerSet(garmentId, garmentLayer);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentLayerSet",
	"params": {
		"garmentId": "value",
		"garmentLayer": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

garmentLayer

Garment layer ID (see garmentLayers enum)

Error/success code (see BwApiErrorCodes enum).

GarmentCrotchCoverRemoveGet

Gets the remove crotch cover state of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentCrotchCoverRemoveGet(garmentId)

C++

BwApiGarmentCrotchCoverRemoveGet(garmentId);

C#

BwApi.GarmentCrotchCoverRemoveGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentCrotchCoverRemoveGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

remove

Boolean (1/0) that represents the sate

Error/success code (see BwApiErrorCodes enum).

GarmentCrotchCoverRemoveSet

Sets the remove crotch cover state of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentCrotchCoverRemoveSet(garmentId, remove)

C++

BwApiGarmentCrotchCoverRemoveSet(garmentId, remove);

C#

BwApi.GarmentCrotchCoverRemoveSet(garmentId, remove);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentCrotchCoverRemoveSet",
	"params": {
		"garmentId": "value",
		"remove": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

remove

Boolean (1/0) that represents the sate

Error/success code (see BwApiErrorCodes enum).

GarmentHandsCoverRemoveGet

Gets the remove hands cover state of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentHandsCoverRemoveGet(garmentId)

C++

BwApiGarmentHandsCoverRemoveGet(garmentId);

C#

BwApi.GarmentHandsCoverRemoveGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentHandsCoverRemoveGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

remove

Boolean (1/0) that represents the sate

Error/success code (see BwApiErrorCodes enum).

GarmentHandsCoverRemoveSet

Sets the remove hands cover state of the current VStitcher active garment.

Python C++ C# VS Server

Python

BwApi.GarmentHandsCoverRemoveSet(garmentId, remove)

C++

BwApiGarmentHandsCoverRemoveSet(garmentId, remove);

C#

BwApi.GarmentHandsCoverRemoveSet(garmentId, remove);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentHandsCoverRemoveSet",
	"params": {
		"garmentId": "value",
		"remove": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

remove

Boolean (1/0) that represents the sate

Error/success code (see BwApiErrorCodes enum).

GarmentDBId

Gets the database location ID of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentDBId(garmentId)

C++

BwApiGarmentDBId(garmentId);

C#

BwApi.GarmentDBId(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentDBId",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

dbId

Int that represents the database ID used to create the garment

Error/success code (see BwApiErrorCodes enum).

GarmentInfoGet

Python C++ C# VS Server

Python

BwApi.GarmentInfoGet()

C++

BwApiGarmentInfoGet();

C#

BwApi.GarmentInfoGet();

VS Server

{
	"id": "API processing order number",
	"function": "GarmentInfoGet",
	"params": {}
}    

GarmentInfoSet

Python C++ C# VS Server

Python

BwApi.GarmentInfoSet()

C++

BwApiGarmentInfoSet();

C#

BwApi.GarmentInfoSet();

VS Server

{
	"id": "API processing order number",
	"function": "GarmentInfoSet",
	"params": {}
}    

GarmentInfoGetEx

Gets garment info by key.

Python C++ C# VS Server

Python

BwApi.GarmentInfoGetEx(garmentId, key)

C++

BwApiGarmentInfoGetEx(garmentId, key);

C#

BwApi.GarmentInfoGetEx(garmentId, key);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentInfoGetEx",
	"params": {
		"garmentId": "value",
		"key": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

key

The key to use for setting and getting this garment info item

Out

dataJSON

Garment info item data (see schema/garment_info.json)

Error/success code (see BwApiErrorCodes enum).

Browzwear automatically set the following keys: season, category, style_id, style_name, match_style, pattern_id, designer, import_source.

GarmentInfoSetEx

Sets / updates garment info by key.

Python C++ C# VS Server

Python

BwApi.GarmentInfoSetEx(garmentId, key, dataJSON)

C++

BwApiGarmentInfoSetEx(garmentId, key, dataJSON);

C#

BwApi.GarmentInfoSetEx(garmentId, key, dataJSON);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentInfoSetEx",
	"params": {
		"garmentId": "value",
		"key": "value",
		"dataJSON": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

key

The key to use for setting and getting this garment info item

In

dataJSON

Garment info item data (see schema/garment_info.json)

Error/success code (see BwApiErrorCodes enum).

If the key already exist, caption and readonly fields will be ignored.

Browzwear automatically set the following keys: season, category, style_id, style_name, match_style, pattern_id, designer, import_source.

GarmentUserDataGet

Gets the garment user data that was previously stored by calling BwApiGarmentUserDataSet.

Python C++ C# VS Server

Python

BwApi.GarmentUserDataGet(garmentId, pluginSection, key)

C++

BwApiGarmentUserDataGet(garmentId, pluginSection, key);

C#

BwApi.GarmentUserDataGet(garmentId, pluginSection, key);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentUserDataGet",
	"params": {
		"garmentId": "value",
		"pluginSection": "value",
		"key": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

pluginSection

Specific vendor or plugin identifier. This key will help VStitcher to retrieve the correct data for the appropriate plugin. (You can specify as many sections as needed. A section is not limited to one per vendor)

In

key

Key for specific property (e.g. "creation date", "plugin version" etc')

Out

buffer

Allocated buffer object to fill with the data previously stored by calling to BwApiGarmentUserDataSet. The returned buffer is a copy of the stored buffer so you are expected to release the buffer when you finish to use it

Error/success code (see BwApiErrorCodes enum).

GarmentUserDataSet

Sets the garment user data

Python C++ C# VS Server

Python

BwApi.GarmentUserDataSet(garmentId, pluginSection, key, buffer)

C++

BwApiGarmentUserDataSet(garmentId, pluginSection, key, buffer);

C#

BwApi.GarmentUserDataSet(garmentId, pluginSection, key, buffer);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentUserDataSet",
	"params": {
		"garmentId": "value",
		"pluginSection": "value",
		"key": "value",
		"buffer": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

pluginSection

Specific vendor or plugin identifier. This key will help VStitcher to retrieve the correct data for the appropriate plugin. (You can specify as many sections as needed. A section is not limited to one per vendor)

In

key

Key for specific property (e.g. "creation date", "plugin version" etc')

In

buffer

Buffer to store in VStitcher. VStitcher will create a copy of this buffer so you are expected to release it after calling to this function

Error/success code (see BwApiErrorCodes enum).

GarmentUserDataStrGet

Gets the garment's user data that was previously stored by calling BwApiGarmentUserDataStrSet.

Python C++ C# VS Server

Python

BwApi.GarmentUserDataStrGet(garmentId, key)

C++

BwApiGarmentUserDataStrGet(garmentId, key);

C#

BwApi.GarmentUserDataStrGet(garmentId, key);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentUserDataStrGet",
	"params": {
		"garmentId": "value",
		"key": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

key

Key for specific property (e.g. "creation date", "plugin version" etc')

Out

userDataStr

The string that was stored in the user data

Error/success code (see BwApiErrorCodes enum).

GarmentUserDataStrSet

Sets the garment's user data.

Python C++ C# VS Server

Python

BwApi.GarmentUserDataStrSet(garmentId, key, userDataStr)

C++

BwApiGarmentUserDataStrSet(garmentId, key, userDataStr);

C#

BwApi.GarmentUserDataStrSet(garmentId, key, userDataStr);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentUserDataStrSet",
	"params": {
		"garmentId": "value",
		"key": "value",
		"userDataStr": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

key

Key for specific property (e.g. "creation date", "plugin version" etc')

In

userDataStr

The string to store in the user data

Error/success code (see BwApiErrorCodes enum).

If userDataStr is NULL (or None in Python) then the key will be erased.

Previous data will be overwritten.

GarmentImportSourceGet_DEPRECATED

Python C++ C#

Python

BwApi.GarmentImportSourceGet_DEPRECATED(garmentId)

C++

BwApiGarmentImportSourceGet_DEPRECATED(garmentId);

C#

BwApi.GarmentImportSourceGet_DEPRECATED(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

path

Import source path

Error/success code (see BwApiErrorCodes enum).

You should use this function only to retrieve import source location from old VStitcher files (6.9 and below).

GarmentPrepare

Start a garment prepare simulation on the current avatar.

Python C++ C# VS Server

Python

BwApi.GarmentPrepare(garmentId)

C++

BwApiGarmentPrepare(garmentId);

C#

BwApi.GarmentPrepare(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentPrepare",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

GarmentDress

Start a garment dress simulation on the current avatar.

Python C++ C# VS Server

Python

BwApi.GarmentDress(garmentId)

C++

BwApiGarmentDress(garmentId);

C#

BwApi.GarmentDress(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentDress",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

GarmentDressEx

Start a garment dress simulation on the current avatar with options.

Python C++ C# VS Server

Python

BwApi.GarmentDressEx(garmentId, simulationInfo)

C++

BwApiGarmentDressEx(garmentId, simulationInfo);

C#

BwApi.GarmentDressEx(garmentId, simulationInfo);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentDressEx",
	"params": {
		"garmentId": "value",
		"simulationInfo": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

simulationInfo

Simulation info (see schema/simulation.json)

Error/success code (see BwApiErrorCodes enum).

GarmentUndress

Undress the current avatar.

Python C++ C# VS Server

Python

BwApi.GarmentUndress(garmentId)

C++

BwApiGarmentUndress(garmentId);

C#

BwApi.GarmentUndress(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentUndress",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

GarmentVisibleIn3D

Check if the garment is visible in 3D or not.

Python C++ C# VS Server

Python

BwApi.GarmentVisibleIn3D(garmentId)

C++

BwApiGarmentVisibleIn3D(garmentId);

C#

BwApi.GarmentVisibleIn3D(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentVisibleIn3D",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

isVisible

Boolean (1/0) that represents the state of the garment in 3D

Error/success code (see BwApiErrorCodes enum).

GarmentFinish

Finish the simulation of the current avatar.

Python C++ C# VS Server

Python

BwApi.GarmentFinish(garmentId)

C++

BwApiGarmentFinish(garmentId);

C#

BwApi.GarmentFinish(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentFinish",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

GarmentTechpackExport

Export a tech pack for the garment.

Python C++ C#

Python

BwApi.GarmentTechpackExport(garmentId, presetName)

C++

BwApiGarmentTechpackExport(garmentId, presetName);

C#

BwApi.GarmentTechpackExport(garmentId, presetName);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

presetName

Preset file name to use (will be loaded from %LOCALAPPDATA%\Browzwear\VStitcher\TechPackPresets\{PRESET_MAME}.tpp)

Out

outputFolder

Folder to save the tech pack materials (if exist, files will be overwritten)

Error/success code (see BwApiErrorCodes enum).

Warning: This function is blocking and may take few seconds to complete.

GarmentCostGet

Get the current estimated cost information for this garment.

Python C++ C#

Python

BwApi.GarmentCostGet(garmentId)

C++

BwApiGarmentCostGet(garmentId);

C#

BwApi.GarmentCostGet(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

costJSON

JSON object as string that represent the current estimated cost information (see schema/costing.json)

Error/success code (see BwApiErrorCodes enum).

GarmentCostSet

Set the current estimated cost information for this garment.

Python C++ C#

Python

BwApi.GarmentCostSet(garmentId)

C++

BwApiGarmentCostSet(garmentId);

C#

BwApi.GarmentCostSet(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

costJSON

JSON object as string that represent the new estimated cost information (see schema/costing.json)

Error/success code (see BwApiErrorCodes enum).

GarmentCostUpdate

Update the current estimated cost information for this garment.

Python C++ C#

Python

BwApi.GarmentCostUpdate(garmentId)

C++

BwApiGarmentCostUpdate(garmentId);

C#

BwApi.GarmentCostUpdate(garmentId);

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

costJSON

JSON object as string that represents the updated estimated cost information (see schema/costing.json)

Error/success code (see BwApiErrorCodes enum).

Use this function to partially update cost information (i.e: update value, state, description etc...).

GarmentSnapshotIdsEx

Get the snapshots IDs for the current active garment (automatic and manual snapshots).

Python C++ C# VS Server

Python

BwApi.GarmentSnapshotIdsEx(garmentId)

C++

BwApiGarmentSnapshotIdsEx(garmentId);

C#

BwApi.GarmentSnapshotIdsEx(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentSnapshotIdsEx",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

snapshotIds

List of all the saved snapshots in the garment

Error/success code (see BwApiErrorCodes enum).

Change of colorway will change the snapshot's ID. After changing the colorway use this function to get the new snapshot's ID.

GarmentClipIds

Gets the clip IDs of the current active garment.

Python C++ C# VS Server

Python

BwApi.GarmentClipIds(garmentId)

C++

BwApiGarmentClipIds(garmentId);

C#

BwApi.GarmentClipIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentClipIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

clipIds

List of all the clips in the garment

Error/success code (see BwApiErrorCodes enum).

GarmentSettingsGet

Get the settings of the garment.

Python C++ C# VS Server

Python

BwApi.GarmentSettingsGet(garmentId)

C++

BwApiGarmentSettingsGet(garmentId);

C#

BwApi.GarmentSettingsGet(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentSettingsGet",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

settings

Settings JSON object as string containing all the garment settings information (see Schema/v1/garment_settings.json schema)

GarmentSettingsUpdate

Update the settings of the garment.

Python C++ C# VS Server

Python

BwApi.GarmentSettingsUpdate(garmentId, settings)

C++

BwApiGarmentSettingsUpdate(garmentId, settings);

C#

BwApi.GarmentSettingsUpdate(garmentId, settings);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentSettingsUpdate",
	"params": {
		"garmentId": "value",
		"settings": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

settings

Settings JSON object as string containing all the garment settings information (see Schema/v1/garment_settings.json schema)

GarmentResourceExtract

Get the resource from BW file.

Python C++ C# VS Server

Python

BwApi.GarmentResourceExtract(garmentId, resourcePath, path)

C++

BwApiGarmentResourceExtract(garmentId, resourcePath, path);

C#

BwApi.GarmentResourceExtract(garmentId, resourcePath, path);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentResourceExtract",
	"params": {
		"garmentId": "value",
		"resourcePath": "value",
		"path": {
			"download_data": {
				"url": "URL",
				"sha256": "SHA256",
				"name": "NAME"
			}
		}
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

resourcePath

The relative path to the BW resource

In

path

The path to extract the file

GarmentGuidelineIds

Get the IDs of guidelines in the garment.

Python C++ C# VS Server

Python

BwApi.GarmentGuidelineIds(garmentId)

C++

BwApiGarmentGuidelineIds(garmentId);

C#

BwApi.GarmentGuidelineIds(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentGuidelineIds",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Out

guidelineIds

Array of int containig the guideline IDs

Error/success code (see BwApiErrorCodes enum).

GarmentUpdateMaterialsFromSourceFiles

Update the garment materials to match source files if available.

Python C++ C# VS Server

Python

BwApi.GarmentUpdateMaterialsFromSourceFiles(garmentId)

C++

BwApiGarmentUpdateMaterialsFromSourceFiles(garmentId);

C#

BwApi.GarmentUpdateMaterialsFromSourceFiles(garmentId);

VS Server

{
	"id": "API processing order number",
	"function": "GarmentUpdateMaterialsFromSourceFiles",
	"params": {
		"garmentId": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

Error/success code (see BwApiErrorCodes enum).

Did this answer your question?