Anna41
Community Beginner
Anna41
Community Beginner
Activity
‎Jul 11, 2020
03:23 PM
1 Upvote
Actually I have found out that this method does not always work when one object is not completely within the other. So for now if anyone else is having this problem, the solution could be: function minusFront(_pathitem, cutting_item){
/* A function that cuts one pathItem object from another one.
* Input: _pathitem object that needs to be cut, pathItem;
* cutting_item the cutting object, pathItem;
* Output: no output.
*/
_pathitem.closed = true;
cutting_item.closed = true;
_pathitem.evenodd = true;
_pathitem.selected = true;
cutting_item.selected = true;
app.executeMenuCommand ('group');
app.executeMenuCommand ('Live Pathfinder Subtract');
app.executeMenuCommand ('expandStyle');
app.executeMenuCommand ('ungroup');
app.activeDocument.selection[0].selected = false;
}
... View more
‎Jun 14, 2020
01:55 AM
Thank you! I didn't know exactly how to use the "executeMenuCommand" commands, now I do 🙂 I was trying to find a more 'clean' way let's say, but this approach will work if there isn't one.
... View more
‎Jun 14, 2020
01:52 AM
Thanks! I have tried the compound shape before, but I didn't know about the evenodd property, so it was not working.
... View more
‎Jun 13, 2020
03:15 PM
Hi guys! I have been searching how to implement shape mode function with javscript (in the Illustrator interface they are called unite and minus front from the Pathfinder window), with no luck. Basically I just need to cut one pathItem fron another one with a script - does anyone know how to do it?
... View more
‎Jun 08, 2020
08:39 AM
2 Upvotes
It worked, thanks a lot!
... View more
‎Jun 08, 2020
07:51 AM
Hi everyone, I was wondering whether I can share my Adobe Illustrator and Indesign scripts on free basis (in a repo)? Or is there some policy or rules that specify the conditions for it from Adobe? Thanks a lot in advance !
... View more
‎Jun 08, 2020
07:48 AM
1 Upvote
Hi, everyone! I'm quite new to scripting in Illustrator, so I was wondering whether I could write a file with a few funcitons that I use most often (like utilities in python) and call them from this file into a different script instead of writing them every time. Like that: ``` // internal_file.js from external_file import Function ``` Unfortunately, I was unable to do it with the standard js methods and I suppose, it's because Illustrator scripting uses a basic version of js that doesn't have all the methods and objects. Has anyone found a way around?
... View more