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

Need help making Pantone calls

Guest
Feb 12, 2010 Feb 12, 2010

All,

First let me say I am very new to scripting and I don't have an overwhelming need for it except on rare occasions.

I am in need of writing some code that will basically place squares on a page that will be filled with a Pantone color.

I am able to create what I need using using CMYK but when I modify the code for Pantone colors it fails.
Here is a sample of the code I need (this is not the exact code):

********************************************************************************************************************************

W = 8.5*72;
H = 11.0*72;

myDocument = app.documents.add(DocumentColorSpace.CMYK, width = W, height = H)
CMYKPatch = new CMYKColor();
    CMYKPatch.cyan = 0;
    CMYKPatch.magenta = 100;
    CMYKPatch.yellow = 100;
    CMYKPatch.black = 0;

rectCMYK = myDocument.pathItems.rectangle( 3/25.4*72, 8/25.4*72, W-(16/25.4*72), -(H-(6/25.4*72)));
            rectCMYK.fillOverprint = true;
            rectCMYK.fillColor = CMYKPatch;
            rectCMYK.stroked = false;

********************************************************************************************************************************

Here is what I believe I need to do:

********************************************************************************************************************************

W = 8.5*72;
H = 11.0*72;


myDocument = app.documents.add(DocumentColorSpace.CMYK, width = W, height = H)


myDocument= app.activeDocument;
myColor = myDocument.ImportAdobeSwatchbookSpotColor("PANTONE Red 32 C");
myDocument.colors.add(myColor);


rectCMYK = myDocument.pathItems.rectangle( 3/25.4*72, 8/25.4*72, W-(16/25.4*72), -(H-(6/25.4*72)));
             rectCMYK.fillOverprint = true;
            rectCMYK.fillColor = MyColor;
             rectCMYK.stroked = false;

********************************************************************************************************************************

The problem is it hangs when it gets to "myColor = myDocument.ImportAdobeSwatchbookSpotColor("PANTONE Red 32 C");"

I have tried to use "app.activeDocument.importAdobeSwatchbookSpotColor ("PANTONE Red 32 C");" with the same results.

I have already checked the documentation and searched online to no avail.

Any help would be greatly appreciated.

TOPICS
Scripting
651
Translate
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
Adobe
Guru ,
Feb 12, 2010 Feb 12, 2010

"importAdobeSwatchbookSpotColor" belongs to ID scripting you are in the Illustrator scripting forum.

Translate
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
Guest
Feb 12, 2010 Feb 12, 2010
"importAdobeSwatchbookSpotColor" belongs to ID scripting you are in the Illustrator scripting forum.

Sorry I didn't make this part clear.

I am using javascript in Adobe ExtendScript Toolkit 2 and illustrator CS3.

I just need to make a pantone call in illustrator and I can't find information on how to do that.

Thanks for any help you can provide.

Translate
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
Guru ,
Feb 12, 2010 Feb 12, 2010
LATEST

Sorry to say that as far as Im aware there is no option to add new bookcolors in this app like you can in ID. I might be proved wrong but the only way I have been able to do anything like this is to dupe from file to file. You can add custom spots but just not from the color books and you can work with existing ones. Im only CS2 so things may have changed.

Translate
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