# Darty Tags
Darty tags are user-provided names which facilitate virtual associations of Illustrator art objects to the variable datasheet.
There are several ways to tag an Illustrator object with the Darty tag using the extension's Tags tab.
Primarily, the Tags tab allows the user to tag currently-selected items in a document. Another, more automated way to tag art objects is to give them names in the Layers panel and use the "Tag by Names" button of the UI.
# Tags Usage Description
Darty tags are used to tag art objects in Illustrator for operating on them.
The following applies to the process of placing and using Darty tags:
- Any selectable object can be tagged.
- Darty tags are saved with the file, and non-Darty users can edit the file without having Darty installed. However, they cannot manipulate the document's Darty tags.
- Darty tags not only stay with the document, they also stay with the artwork. This means art which was tagged with a Darty tag could be pasted among documents and will still retain the tag.
- Currently, Opacity Mask objects cannot be affected by Darty, so tagging art inside of an Opacity Mask will have no effect.
- Currently, the content tagged in an Envelope can only be affected by Darty if the document has been saved with the subject item's envelope mode set to "Edit Contents".
# Naming Rules
- Tags names are case insensitive.
- They must not contain any of these characters:
[]{}()&|^.*$~<>!,
- Any art object that can be selected, can be tagged.
- Layers cannot be tagged with Darty tags; to manipulate layers use the Darty Layers method.
# Tag-Search Rules
# Simple Searches
Cat
finds items tagged cat
(tags are case insensitive)
!cat
finds items NOT tagged cat
cat | dog
finds items tagged either cat
or dog
cat & tabby
finds items tagged both cat
and tabby
cat & !tabby
finds items tagged cat
but not tabby
!cat & !dog
finds items that are not tagged cat
and not tagged dog
(cat | dog) & !dangerous
finds items tagged cat
or dog
but not dangerous
^ca
finds items tagged with a tag that starts with the letters ca
og$
finds items tagged with a tag that ends with the letters og
# Relative Search
These searches consider the item's position relative to other items in the Layers Panel.
animals > cat
finds items tagged cat
in a group tagged animals
First GROUP animals
then >
then ITEM cat
animals < cat
finds groups tagged animals
containing an item tagged cat
First GROUP animals
then <
then ITEM cat
cat ~ chicken
finds items tagged cat
that are siblings of items tagged chicken
SIBLINGS are items on the same nested level in the Layers Panel
The two groups tagged cat
in the animals
group are siblings.
# Power-User Searches
These searches are designed for power users who are familiar with advanced CSS specifications.
Less than 1% of users are expected to use them.
nthChild(animals, 3)
finds the third item of groups tagged animals
A child refers to a first-level member of a group.
Example: A group
animals
contains a groupcat
, which contains a groupeyes
.
cat
is a CHILD of the groupanimals
.
eyes
is a CHILD of the groupcat
.
eyes
is a DESCENDANT of the groupanimals
.
nthChild(animals, 2n)
finds every second item of groups tagged animals
, i.e., items 2, 4, 6, etc. (even numbers).
nthChild(animals, 3n)
finds every third item of groups tagged animals
, i.e., items 3, 6, 9, etc.
nthChild(animals, 2n + 1)
finds every second item, starting from the first item, of groups tagged animals
, i.e., items 1, 3, 5, etc. (odd numbers)
First GROUP animals
, then FREQUENCY 2n
, then START FROM +1
.
If no START FROM is provided, it will start from the FREQUENCY number, 2
.
nthChild(animals, 2n + 3)
finds every second item, starting from the third item, of groups tagged animals
, i.e., items 3, 5, 7, etc.
nthOfType(cat, 2n + 1)
finds every second SIBLING item starting from the first item +1
, tagged cat
SIBLINGS are items on the same nested level in the Layers Panel.
Example: The cats in the animals group are SIBLINGS to each other.
Cats in the cats group are SIBLINGS to each other.
Cats in the animals group are not SIBLINGS with cats in the cats group.
firstOfType(cat)
finds the first item tagged cat
on the same nested layer or group level.
lastOfType(cat)
finds the last item tagged cat
on the same nested layer or group level.
globalNthOfType(cat, 3)
finds the third item in the document tagged cat
Unlike nthOfType(cat, 3)
, which finds the third item tagged cat
in each group/collection,
globalNthOfType(cat, 3)
considers the whole document as a single collection and finds only the third instance of an item tagged cat
in the entire document.
globalNthOfType(cat, 2n + 1)
finds every second item in the document tagged cat
, starting from the first instance, regardless of whether or not the items are in groups.
globalFirstOfType(cat)
finds the first item in the document tagged cat
.
globalLastOfType(cat)
finds the last item in the document tagged cat
.
siblingBefore(tabby & cat)
finds the SIBLING item below items tagged both tabby
and cat
.
siblingAfter(tabby & cat)
finds the SIBLING item above items tagged both tabby
and cat
.
parent(cat)
finds group items that are the PARENT of items tagged cat
A PARENT of a CHILD is a group containing the child item that is not nested in another group.
children(animals)
finds items that are the children of a group tagged animals
CHILDREN are members of a group that are not nested in another group.
firstChild(animals)
finds the first child (non-nested) item of the group tagged animals
.
lastChild(animals)
finds the last child (non-nested) item of the group tagged animals
.
ancestors(cat)
finds items that are in any group that is an ancestor of items tagged cat
Example:
cat
andmouse
are grouped together,dog
andchicken
are grouped together in another group.
The two groups are grouped together, so all items in the uppermost ANCESTOR group of the item taggedcat
will be found, i.e., thecat
,mouse
, their containing group, and thedog
,chicken
, and their containing group.
descendants(animals)
finds group/item tagged animals
and all its DESCENDANTS,
i.e., all items in the group no matter how nested those items are in nested groups.