Setattr is a general, multipurpose attribute-setting command. It sets an attribute named attr-name (existing or new) of the specified items at the indicated level to a single user-supplied value. Following the usual convention, a blank specification means “all.” A new attribute will not be created unless create is true (default false). Whereas setattr assigns only a single value per command, many values can be assigned at once by reading a separately generated attribute assignment file with the open command. See also: info, the custom preset example, Selection Inspector
The level can be any one of the following:
The attr-name may include upper- and lower-case letters, numbers (digits), and underscores, but cannot start with a digit.
If the type option is omitted, the data type will be guessed as follows:
If the type is given as boolean, value can be truncated, with synonyms for true: True, 1, and synonyms for false: False, 0.
Although setattr does not restrict which attributes it can affect, using it for certain attributes may not make sense. For example, a simpler command may already exist to perform the same task:
setattr /a res ribbon_color orange
– is equivalent to –
color /a orange targ r