# Set

Every object (layer, item, text, number and more) have properties that can be changed for example the layer "name" property and properties that can only be viewed and can't be changed.

The general purpose of the set automation line is to let you change the value of one of the properties of the object(layer, item, text, number and more), the set automation line will show you a reduced list of properties that consists only of the properties that can be changed so some properties will that are available in other automation lines like the if and the message will be missing, for example the width and height of a layer can’t be changed so they won’t show in the set properties but the width and height of specific item like composition and solid can be changed so they will show in the set properties.&#x20;

first you have to specify which property to set and then specify what the new value of this property should be.



Set can run mathematical calculation on many properties or custom value,

you can add as many variables/custom values to the calculation as you need by clicking the plus(+) button on the end of the line.

for example you can set the value of the  "x position" property of a layer to the "width" property of the composition multiply by 2 and the results will be the middle of the composition.&#x20;

![this automation will center all the layers in the active comp in the x axes.](https://2400490544-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MhmfherpD6FRup-Pt1p%2Fuploads%2FmTChzMYZPBcptB0VB5Cz%2FSet%20Example01.PNG?alt=media\&token=cd85f473-843f-4413-8514-9fc8bbc53c92)

this example demonstrates how to set the value of a layer property with other item property value that is multiplied by 2.

**Set won’t change a value of property that has keyframes.**





### Reference Properties -&#x20;

in some objects(Number, Text, Property/Effect, Project, Collection, File, Folder) there are properties that exists only as a helper property for other properties/actions, most of the time they will contain a value(that can be changes) that will be used when running another automation line with other property that use this referenced property in a calculation, so after changing/setting these properties none visible change will take effect.



### Why reference properties exists in the first place? -

in some cases you need a finer control on a certain action so you will need more than one input for this action, for example the number action "generate a random number" in some cases you will want to randomize a number between 2 numbers, a minimum and maximum (randomize number between 1 and 10), for this there are 2 number properties called "random minimum" and "random maximum", you can change these helper properties value and then use the action "randomize number".



## List of reference helper properties -

### Number

<table><thead><tr><th width="237.33333333333331">Property Name</th><th>Property/action that use this property</th><th>More Information</th></tr></thead><tbody><tr><td>random minimum</td><td>action(randomize number)</td><td></td></tr><tr><td>random maximum</td><td>action(randomize number)</td><td></td></tr><tr><td>round random</td><td>action(randomize number)</td><td>when true, return random round number</td></tr></tbody></table>

### Text

| Property Name | Property/action that use this property                                                                                                          | More Information |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| text element  | <p>action(find and replace text element)</p><p>action(find and replace first text element)</p><p>action(find and replace last text element)</p> |                  |

### Property/Effect

| Property Name | Property/action that use this property                                 | More Information |
| ------------- | ---------------------------------------------------------------------- | ---------------- |
| time          | all other properties and action of the object reference this property  |                  |

### Project

| Property Name              | Property/action that use this property | More Information                                                                     |
| -------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------ |
| javascript variable inputs | action(run javascript code)            | this property pass the variables names that the JavaScript code will be able to use. |
| javascript code result     | action(run javascript code)            | this property gets a value only after running the action "run javascript code".      |

### Collection

| Property Name | Property/action that use this property                                                            | More Information |
| ------------- | ------------------------------------------------------------------------------------------------- | ---------------- |
| separator     | <p>property(all elements as text with separator)</p><p>action(add text elements by separator)</p> |                  |



### File/Folder

| Property Name | Property/action that use this property                                                   | More Information |
| ------------- | ---------------------------------------------------------------------------------------- | ---------------- |
| date format   | <p>property(date created)</p><p>property(date modified)</p><p>property(current date)</p> |                  |

#### Formatting Tokens (date format)

|                       | Token | Output                                 |
| --------------------- | ----- | -------------------------------------- |
| **Month**             | M     | 1 2 ... 11 12                          |
|                       | MM    | 01 02 ... 11 12                        |
|                       | MMM   | Jan Feb ... Nov Dec                    |
|                       | MMMM  | January February ... November December |
| **Day of Month**      | D     | 1 2 ... 30 31                          |
|                       | Do    | 1st 2nd ... 30th 31st                  |
|                       | DD    | 01 02 ... 30 31                        |
| **Day of Week**       | d     | 0 1 ... 5 6                            |
|                       | ddd   | Sun Mon ... Fri Sat                    |
|                       | dddd  | Sunday Monday ... Friday Saturday      |
| **Year**              | YY    | 70 71 ... 29 30                        |
|                       | YYYY  | 1970 1971 ... 2029 2030                |
| **AM/PM**             | A     | AM PM                                  |
|                       | a     | am pm                                  |
| **Hour**              | H     | 0 1 ... 22 23                          |
|                       | HH    | 00 01 ... 22 23                        |
|                       | h     | 1 2 ... 11 12                          |
|                       | hh    | 01 02 ... 11 12                        |
| **Minute**            | m     | 0 1 ... 58 59                          |
|                       | mm    | 00 01 ... 58 59                        |
| **Second**            | s     | 0 1 ... 58 59                          |
|                       | ss    | 00 01 ... 58 59                        |
| **Fractional Second** | S     | 0 1 ... 8 9                            |
|                       | SS    | 0 1 ... 98 99                          |
|                       | SSS   | 0 1 ... 998 999                        |
| **Timezone**          | Z     | -07:00 -06:00 ... +06:00 +07:00        |
|                       | ZZ    | -0700 -0600 ... +0600 +0700            |

