SnapshotLoad
Load a snapshot.
Python C++ C# VS Server
Python
BwApi.SnapshotLoad(garmentId, snapshotId)
C++
BwApiSnapshotLoad(garmentId, snapshotId);
C#
BwApi.SnapshotLoad(garmentId, snapshotId);
VS Server
{
"id": "API processing order number",
"function": "SnapshotLoad",
"params": {
"garmentId": "value",
"snapshotId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | snapshotId | Existing snapshot ID |
Error/success code (see BwApiErrorCodes enum).
Loading a snapshot always uses the current colorway.
SnapshotLoadEx
Load a snapshot with properties.
Python C++ C# VS Server
Python
BwApi.SnapshotLoadEx(garmentId, loadSnapshotJson, snapshotId)
C++
BwApiSnapshotLoadEx(garmentId, loadSnapshotJson, snapshotId);
C#
BwApi.SnapshotLoadEx(garmentId, loadSnapshotJson, snapshotId);
VS Server
{
"id": "API processing order number",
"function": "SnapshotLoadEx",
"params": {
"garmentId": "value",
"loadSnapshotJson": "value",
"snapshotId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | loadSnapshotJson | JSON object as a string containing properties for loading a snapshot (see schema/load_snapshot.json) |
In | snapshotId | Existing snapshot ID |
Error/success code (see BwApiErrorCodes enum).
Loading a snapshot always uses the current colorway.
SnapshotSave
Save the current simulation state as a snapshot.
Python C++ C#
Python
BwApi.SnapshotSave(garmentId, name)
C++
BwApiSnapshotSave(garmentId, name);
C#
BwApi.SnapshotSave(garmentId, name);
Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | name | The name of the snapshot |
Out | snapshotId | The ID of the snapshot |
Error/success code (see BwApiErrorCodes enum).
SnapshotInfoGet
Get information on a given snapshot.
Python C++ C# VS Server
Python
BwApi.SnapshotInfoGet(garmentId, snapshotId)
C++
BwApiSnapshotInfoGet(garmentId, snapshotId);
C#
BwApi.SnapshotInfoGet(garmentId, snapshotId);
VS Server
{
"id": "API processing order number",
"function": "SnapshotInfoGet",
"params": {
"garmentId": "value",
"snapshotId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | snapshotId | Existing snapshot ID |
Out | info | JSON object as a string that represents a snapshot (see Schema/snapshot_info.json schema) |
Error/success code (see BwApiErrorCodes enum).
SnapshotDelete
Delete a snapshot.
Python C++ C# VS Server
Python
BwApi.SnapshotDelete(garmentId, snapshotId)
C++
BwApiSnapshotDelete(garmentId, snapshotId);
C#
BwApi.SnapshotDelete(garmentId, snapshotId);
VS Server
{
"id": "API processing order number",
"function": "SnapshotDelete",
"params": {
"garmentId": "value",
"snapshotId": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | snapshotId | Existing snapshot ID |
Error/success code (see BwApiErrorCodes enum).
SnapshotThumbnailGet
Export a snapshot thumbnail.
Python C++ C# VS Server
Python
BwApi.SnapshotThumbnailGet(garmentId, snapshotId, path)
C++
BwApiSnapshotThumbnailGet(garmentId, snapshotId, path);
C#
BwApi.SnapshotThumbnailGet(garmentId, snapshotId, path);
VS Server
{
"id": "API processing order number",
"function": "SnapshotThumbnailGet",
"params": {
"garmentId": "value",
"snapshotId": "value",
"path": {
"download_data": {
"url": "URL",
"sha256": "SHA256",
"name": "NAME"
}
}
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | snapshotId | Existing snapshot ID |
In | path | Path to the thumbnail output |
Error/success code (see BwApiErrorCodes enum).
SnapshotRename
Rename a snapshot.
Python C++ C# VS Server
Python
BwApi.SnapshotRename(garmentId, snapshotId, newSnapshotName)
C++
BwApiSnapshotRename(garmentId, snapshotId, newSnapshotName);
C#
BwApi.SnapshotRename(garmentId, snapshotId, newSnapshotName);
VS Server
{
"id": "API processing order number",
"function": "SnapshotRename",
"params": {
"garmentId": "value",
"snapshotId": "value",
"newSnapshotName": "value"
}
} Parameters
Param | Variable | Description |
In | garmentId | Existing garment ID |
In | snapshotId | Existing snapshot ID |
In | newSnapshotName | New snapshot name |
Error/success code (see BwApiErrorCodes enum).