Skip to main content
Murali.M
Known Participant
April 8, 2019
Answered

Appearance Panel access in javascript

  • April 8, 2019
  • 1 reply
  • 1579 views

Hi guys,

I need help to access to appearance panel,

I need to add multiple fill colors in a object using appearance panel.

how to add multiple fill swatchs in appearance?

This topic has been closed for replies.
Correct answer Silly-V

Although unfortunately we are not supplied with any scripting control over the appearance palette, it is possible to manipulate the appearances of artwork in some ways.

First, there is no editing of any appearances in the literal sense as there's no scripting interface available for the usage of the appearance panel in a similar way that a user might use it. All that is possible is using graphic styles, menu commands that have anything to do with graphic styles and maybe even the cryptic feature Re: PageItem.applyEffect(LiveEffectXML)  Live Effect XML.

It is possible to capture new graphic styles and to apply them in various ways via the additive or replacement mode during script execution.

So it is theoretically possible to get art to grow some new multi-fill appearances by using temporary art with a (possibly dynamically-changed) fill and any other effects, capturing a new graphic style and adding it to the subject artwork using the GraphicStyle .applyTo() or mergeTo() methods. In an extended usage of the same, a follow-up of one or a series of Live Effect XML commands could be used to style that single fill before it is then added to the main artwork with the 'mergeTo()' command.

This is all somewhat speculative, but should make for a unique and fun test exercise.

1 reply

Silly-V
Silly-VCorrect answer
Legend
April 8, 2019

Although unfortunately we are not supplied with any scripting control over the appearance palette, it is possible to manipulate the appearances of artwork in some ways.

First, there is no editing of any appearances in the literal sense as there's no scripting interface available for the usage of the appearance panel in a similar way that a user might use it. All that is possible is using graphic styles, menu commands that have anything to do with graphic styles and maybe even the cryptic feature Re: PageItem.applyEffect(LiveEffectXML)  Live Effect XML.

It is possible to capture new graphic styles and to apply them in various ways via the additive or replacement mode during script execution.

So it is theoretically possible to get art to grow some new multi-fill appearances by using temporary art with a (possibly dynamically-changed) fill and any other effects, capturing a new graphic style and adding it to the subject artwork using the GraphicStyle .applyTo() or mergeTo() methods. In an extended usage of the same, a follow-up of one or a series of Live Effect XML commands could be used to style that single fill before it is then added to the main artwork with the 'mergeTo()' command.

This is all somewhat speculative, but should make for a unique and fun test exercise.