Skip to main content
Known Participant
October 4, 2022
Answered

Script to embed linked eps as compound path or remove linked clipping

  • October 4, 2022
  • 1 reply
  • 870 views

I use variables to insert eps files as specified in csv.  I can then do the following steps

  1. embed(button)
  2. edit contents (button)
  3. copy /paste ( this is now compound path, which is what I need)
  4. delete original item ( which is clip group). Removing masking might also work, but not sure how to do this.

With actions, I can't seem to select embed, and edit contents, so wondering if there is better way. Maybe with jsx? Eventually, I take these multiple compound paths, unite shapes, and cut solid sign out of metal. 

This topic has been closed for replies.
Correct answer CarlosCanto

Attached some files, initial and final.   Sometimes the football does not appear when I open the initial file, but clicking on that area will show it.  I was able to embed with jsx, but couldn't figure out how to object ->clipping mask -> release.    Thansks for your help! This jsx stuff looks awesome. I'm on windows 11 home. 


let's start with releasing the mask, clipping group needs to be selected before running the command below

app.executeMenuCommand ("releaseMask")

 

at this point, your selection has both clipped items and clipping path. The clipping path should be the top path

selection[0].remove()

 

you could also check for a no-fill, no-stroke path before deleting it

1 reply

Known Participant
October 4, 2022

Got a little closer by 

  1. linked to embed button (manual button)
  2. clipping mask -> release (action) 
  3. ungroup (action)
  4. delete mask ( still trying to figure out how to add this to actions, but manual for now).

 

Four click actions not horribe, but will continue quest for 1 click to rule them all.  I will need to do this about 120 times a week from now until christmas. Looks like jsx is most power thing available for this kind of scripting. Will start to dig into that more. 

CarlosCanto
Community Expert
October 5, 2022

can you share a sample file? It seems all steps can be achieved with a script

Known Participant
October 5, 2022

Attached some files, initial and final.   Sometimes the football does not appear when I open the initial file, but clicking on that area will show it.  I was able to embed with jsx, but couldn't figure out how to object ->clipping mask -> release.    Thansks for your help! This jsx stuff looks awesome. I'm on windows 11 home.