2 Replies Latest reply on Feb 11, 2016 7:01 AM by Silly-V

    Illustrator - Coumpound Path Bug in javascript

    jolg42

      Hi,

       

      We found that CompoundPath have a bug in every version of Illustrator, even the last one and apparently it was found by others before us but I did not find any ticket about it so here it is :

       

      I attached the file with a working case and the compound path bug (LEFT object = BUG | RIGHT object = WORKING).

       

      So in Adobe CEP with the javascript (extendscript API), I was parsing the pathItems inside the compoundPath and I was surprised that there was only 2 pathItems inside and it was looking like 3 different shapes. So for the 'ö' I deleted the two dots and retried and surprise the 'o' was still here on the Illustrator layer but there wasn't any pathItem inside this compoundPath!

       

      It seems like this bug is an Illustrator bug that makes possible to put a group inside a CompoundPath and if you do that there is no way to have have access to all pathItems inside via the javascript API.

       

      We see this bug as a major bug for us & cep / javascript scripting, so it will be great to have any feedback on this !

       

       

      Reference to other people writing about it :

       

      The only problem I think you may run into is the quirky way Illustrator allows Groups to be inside CompoundPaths. Crazy, right, because CompoundPathItem doesn't have a GroupItems or PageItems property, so you can't get them out using the above method. In fact, it may get stuck in an infinite loop if there's one like that!

      https://forums.adobe.com/thread/1575232?start=0&tstart=0

       

      Normally, creating a group of two paths wouldn't even be possible in Illustrator.

      But if you create a group of one path, select this group and an other path, make a compoundPath of this selection, you get a group inside a compoundPath.

      http://stackoverflow.com/a/26847856

       

      A Compound Path Issue

      Some scripts don't work for some part of compound paths. When this occurs, please select part of the compound path or release the compound path and select them, then run script again. I still have not figured out how to get properties from grouped paths inside a compound path.

      http://shspage.com/aijs/en