Skip navigation
Currently Being Moderated

Change color space

Oct 15, 2011 6:19 AM

Hi!

 

Is there any way to change a documents color space on an already open document in VBS?

I have tried "AiDocumentColorSpace" but this seems to be a read only value!?

 

Please help!

 

/Tommy

 
Replies
  • Currently Being Moderated
    Oct 15, 2011 7:40 AM   in reply to fire_swe

    Yep its a read only property… The only files you can assign a color space to are pre version 9 where you could have mixed space objects… You may have to copy the file contents to a new document although I've not tested that…

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 17, 2011 9:17 AM   in reply to fire_swe

    Mark's option is the only one available. You will need to create a new document with the proper color space and move all Page Items to the new docuemnt.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2011 11:40 PM   in reply to Larry G. Schneider

    Hi guys, since the OP never bothered to come back for his answer, this answer is rather aimed to us. We can record a couple of actions to change the color mode of an open document, then use VBS (or perhaps AS, can any of you translate it?) to run those actions.

     

    changeColorModeActions.PNG

    'script must be run outside Illustrator, it can not run from the File->Scripts Menu
    set iapp = CreateObject("Illustrator.Application")
    set idoc = iapp.ActiveDocument
    colormode = idoc.DocumentColorSpace
     
     
    if colormode = 1 then iapp.DoScript "colorModeCMYK", "Set 1", True
    if colormode = 2 then iapp.DoScript "colorModeRGB", "Set 1", True
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points