Back to Uxp Photoshop

CountItems

src/pages/ps_reference/classes/countitems.md

2.2.04.0 KB
Original Source

CountItems

A collections class allowing access to the document's CountItem.

Properties

NameTypeAccessMin VersionDescription
lengthnumberR24.1Number of CountItem elements in this collection.
parentDocumentR24.1The owner Document of this CountItems collection.
typenamestringR24.1The CountItems collection's typename.

Methods

activateGroupByIndex

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Activates a Count Item group by its index.

Parameters

NameType
indexnumber

add

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

CountItem

Adds a new CountItem to the collection.

javascript
app.activeDocument.countItems.add({x: 20, y: 20});

Parameters

NameType
positionobject
position.xnumber
position.ynumber

createGroup

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Creates a new Count Item group.

Parameters

NameType
groupNamestring

getAll

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

CountItem[]

Retrieves all CountItem objects from this collection.

javascript
app.activeDocument.countItems.getAll();

removeAllFromActiveGroup

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Clears all CountItem objects from this collection.

javascript
app.activeDocument.countItems.removeAllFromActiveGroup();

removeGroupByIndex

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Removes a Count Item group by its index.

Parameters

NameType
indexnumber

renameActiveGroup

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Renames the currently active Count Item group.

Parameters

NameType
groupNamestring

setActiveColor

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Sets the Color of the Count Item marker and label.

Parameters

NameType
colorSolidColor

setActiveLabelSize

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Sets the Count Item label (the number) size.

Parameters

NameType
sizenumber

setActiveMarkerSize

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Sets the Count Item marker (the dot) size.

Parameters

NameType
sizenumber

toggleActiveGroupVisibility

<span class="minversion" style="display: block; margin-bottom: -1em; margin-left: 36em; float:left; opacity:0.5;">24.1</span>

void

Toggles the visibility of the currently selected Count Item group.

Parameters

NameType
isVisibleboolean