I am trying to automate the export of an open file to Illustrator CS 6 format. I have found that the output is very different from when the same process is run manually. I have to assume there's some kind of issue with the macro, but what could it be?
2K words worth of examples:
File exported while macro was being recorded:
File exported by running the recorded macro:
The macro is obviously killing all the transparencies but since it was recording my actions, shouldn't the macro produce the same results as the actions it was supposed to be recording?
Any suggestions on how I could make this work would be greatly appreciated.
Cheers,
J^2
Thank you all for the replies. I have been able to get something closer to what I need. However, one last thing I am seeing is that the color space is getting converted to RGB when I export using the saved Macro vs a manual export. Does anyone have a full list of the settings available for the ExportFilter object?
Getting deeper into the weeds (and this abysmal excuse for API documentation! Where are the examples? Seriously!) and it's looking like I need to define ProofColorSettings, which needs a ColorContext, and the rabbit whole goes ever deeper... Am I missing something fundamental here? Is there not a way to export via a script that gives me the exact same output as doing an export manually?
If your dialog says, "U.S. Web Coated (SWOP) v2" as shown below:
You would add the following line:
expopt.ProofColorSettings = CreateProofColorSettings("U.S. Web Coated (SWOP) v2")
Hopefully that does the trick for you,
-Shelby
Hmm. That seems to give me the same output. When I export a PNG I get the same colors I see in Corel. I figured I would record a macro of me exporting a PNG and see what those settings are. Alas, when I recorded a macro, it just gave me an empty sub...
You should be able to see the file change to confirm the Profile is being embedded. My sample file went from 15KB to 931KB.
I'm seeing a curious error message when opening this new AI file:
"Your current color settings honor CMYK profiles in linked content but profiles were set to be ignored when this document was created."
So, that's new at least. Now I just need to figure out why it's being created with the profiles ignored... Also, the file is opening in AI as RGB, not CMYK. When I export the file manually, it opens in AI as CMYK. What would cause that?
Seems like that's a red herring. I must have borked something in AI when fiddling with the color settings there. So. Close... If I could just figure out this color issue I would have this problem done.
It is opening as CYMK for me when the Profile is Embedded (The Larger File Size) if it is not, then it opens as RGB.
Interesting... Perhaps I missed something. Here's the code I am using currently:
Dim expopt As StructExportOptions Set expopt = CreateStructExportOptions expopt.UseColorProfile = Trueexpopt.ProofColorSettings = CreateProofColorSettings("U.S. Web Coated (SWOP) v2")Dim expflt As ExportFilter Set expflt = ActiveDocument.ExportEx(fileName, cdrAI, cdrActivePage, expopt) Call util.Log("[Debug] Performing ActiveDocument.ExportEx to " & fileName)With expflt .Version = 10 ' FilterAILib.aiVersionCS6 <-- This file can not be imported into Maya. For color reference only .TextAsCurves = False.ConvertSpotColors = False .SimulateOutlines = False .SimulateFills = False .IncludePlacedImages = True 'fullColor .IncludePreview = True .EmbedColorProfile = True .Finish End With
The above code worked fine for me. It opened just liked the screenshot I had shown above.