A collection of swatches.
Methods
SwatchanyItem ()
Returns any Swatch in the collection.
number count ()
Displays the number of elements in the Swatch.
Array of SwatcheveryItem ()
Returns every Swatch in the collection.
SwatchfirstItem ()
Returns the first Swatch in the collection.
Swatchitem (index:
any)
Returns the Swatch with the specified index or name.
| Parameter | Type | Description |
|---|---|---|
| index | Long Integer String |
The index or name. Can accept: Long Integer or String. |
SwatchitemByID (id:
number)
Returns the Swatch with the specified ID.
| Parameter | Type | Description |
|---|---|---|
| id | number | The ID. |
SwatchitemByName (name:
string)
Returns the Swatch with the specified name.
| Parameter | Type | Description |
|---|---|---|
| name | string | The name. |
Array of SwatchitemByRange (from:
any, to:
any)
Returns the Swatches within the specified range.
| Parameter | Type | Description |
|---|---|---|
| from | Swatch Long Integer String |
The Swatch, index, or name at the beginning of the range. Can accept: Swatch, Long Integer or String. |
| to | Swatch Long Integer String |
The Swatch, index, or name at the end of the range. Can accept: Swatch, Long Integer or String. |
SwatchlastItem ()
Returns the last Swatch in the collection.
SwatchmiddleItem ()
Returns the middle Swatch in the collection.
SwatchnextItem (obj:
Swatch)
Returns the Swatch whose index follows the specified Swatch in the collection.
| Parameter | Type | Description |
|---|---|---|
| obj | Swatch | The Swatch whose index comes before the desired Swatch. |
SwatchpreviousItem (obj:
Swatch)
Returns the Swatch with the index previous to the specified index.
| Parameter | Type | Description |
|---|---|---|
| obj | Swatch | The index of the Swatch that follows the desired Swatch. |
string toSource ()
Generates a string which, if executed, will return the Swatch.
Element of:
Application.swatches
Document.swatches