Copy link to clipboard
Copied
Hi All,
How to convert all SPOT to PROCESS in swatch using CS3-JS?
Without changing the default swatches [Paper,Reg...]
Thanks in advance.
Sam
Sam try the below code to do that:
app.activeDocument.inks.everyItem().convertToProcess = true;
Regards,
Ramkumar .P
Copy link to clipboard
Copied
Hi Sam,
Use the below code to conver:
SPOT to PROCESS:
app.activeDocument.swatches.itemByRange(4,app.activeDocument.swatches.length-1).model = 1886548851;
PROCESS to SPOT:
app.activeDocument.swatches.itemByRange(4,app.activeDocument.swatches.length-1).model = 1936748404;
Regards,
Ramkumar .P
Copy link to clipboard
Copied
Thanks Ramkumar.
But I need to convert all the spot to process in InkManager not in the swatch pallete.
Is there any way to do this???
Sam
Copy link to clipboard
Copied
Sam try the below code to do that:
app.activeDocument.inks.everyItem().convertToProcess = true;
Regards,
Ramkumar .P
Copy link to clipboard
Copied
thank you so much Ramkumar.
I need one more clarification: is there any method to delete the unused swatches???
Sam
Copy link to clipboard
Copied
Hi Sam,
Use below code:
var unusedcolor = app.activeDocument.unusedSwatches;
var unusedcolorlen = unusedcolor.length;
for (a = unusedcolorlen-1; a >= 0; a--)
{
unusedcolor.remove();
}
Cheers,
Shonky
Copy link to clipboard
Copied
try this Sam:
var mySW = app.activeDocument.unusedSwatches
for(i=mySW.length-1;i>=0;i--)
mySW.remove();
Regards,
Ramkumar .P
Copy link to clipboard
Copied
Credit to Dirk Becker:
var u = app.activeDocument.unusedSwatches; while( u.length )
u.pop().remove();
Harbs
Find more inspiration, events, and resources on the new Adobe Community
Explore Now