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

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

Explorer ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

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. 

TOPICS
Scripting , SDK

Views

222

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Oct 05, 2022 Oct 05, 2022

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

Votes

Translate

Translate
Adobe
Explorer ,
Oct 04, 2022 Oct 04, 2022

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

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
Community Expert ,
Oct 05, 2022 Oct 05, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Oct 05, 2022 Oct 05, 2022

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

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
Community Expert ,
Oct 05, 2022 Oct 05, 2022

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Oct 05, 2022 Oct 05, 2022

Copy link to clipboard

Copied

LATEST

Cool this works.  I have to select item, so will work on doing that by vairable name next, as there will be multiple images to unite. 

if ( app.documents.length > 0) {
    doc = app.activeDocument;

selection[0].embed()
app.executeMenuCommand ("releaseMask")
app.executeMenuCommand ("ungroup")
selection[0].remove();
}

 

Votes

Translate

Translate

Report

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