Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Illustrator CC Flatten Transparency with doScript(action, actionSet)

Valorous Hero ,
Aug 19, 2013 Aug 19, 2013

Hi Yall!

I have the creative cloud illustrator with which I'd like to process a bunch of files.   Of course, for my processing needs, the file has to be outlined & expanded, etc, to ensure all the plugin items, text frames and strokes become just outlined shapes to mess with.  I was excited about the potential of the doScript in illustrator to play any action, so I made a simple action which selects all and flattens transparency.  This does seem to work, except for the part where it gives me this aler box of an error: "The operation cannot complete because of an unknown error: [Parm]" .

The flattening process seems to have worked ok though, and the objects did become flattened.  The error message can be turned off using the UserInteractionLevel.DONTDISPLAYALERTS , but wacky things happen with the display, such as the edges of paths become invisible and the preview redrawing gets all wiggy.

Does anybody have a better way to flatten the transparency, or is there something I'm missing?

The action is this:

/version 3

/name [ 7

          466c617474656e

]

/isOpen 1

/actionCount 1

/action-1 {

          /name [ 20

                    466c617474656e205472616e73706172656e6379

          ]

          /keyIndex 0

          /colorIndex 0

          /isOpen 1

          /eventCount 2

          /event-1 {

                    /useRulersIn1stQuadrant 0

                    /internalName (adobe_selectAll)

                    /localizedName [ 10

                              53656c65637420416c6c

                    ]

                    /isOpen 0

                    /isOn 1

                    /hasDialog 0

                    /parameterCount 0

          }

          /event-2 {

                    /useRulersIn1stQuadrant 0

                    /internalName (ai_plugin_flatten_transparency)

                    /localizedName [ 20

                              466c617474656e205472616e73706172656e6379

                    ]

                    /isOpen 0

                    /isOn 1

                    /hasDialog 1

                    /showDialog 0

                    /parameterCount 5

                    /parameter-1 {

                              /key 1920169082

                              /showInPalette 4294967295

                              /type (integer)

                              /value 75

                    }

                    /parameter-2 {

                              /key 1919253100

                              /showInPalette 4294967295

                              /type (unit real)

                              /value 300.0

                              /unit 592342629

                    }

                    /parameter-3 {

                              /key 1869902968

                              /showInPalette 4294967295

                              /type (boolean)

                              /value 1

                    }

                    /parameter-4 {

                              /key 1869902699

                              /showInPalette 4294967295

                              /type (boolean)

                              /value 1

                    }

                    /parameter-5 {

                              /key 1667463282

                              /showInPalette 4294967295

                              /type (boolean)

                              /value 1

                    }

          }

}

and the script is this:

function test(){

     app.loadAction('File.aia of the actions described above');

     app.doScript('Flatten Transparency', 'Flatten', false);

}

test();

Thanks!

Screen Shot 2013-08-19 at 3.23.09 PM.png

TOPICS
Scripting
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Valorous Hero ,
Aug 19, 2015 Aug 19, 2015
LATEST

I will chalk it up to the novelty of CC back in 2013, as I have not experienced this error since.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines