Copy link to clipboard
Copied
I cannot believe how hard this is proving to be.
If not this type of thing then what are actions for?
All I want to do is something that should so simple and easily facilitated in Illustrator which is to rename 2 layers (because Illustrator programmers in their wisdom - decide for us that when we import a PSD file with named layers then they get tagged with 'Image' at the end).
Rename 2 layers and apply a custom spot colour to a shape.
I have defined the spot colour - set it to persistent - but nothing at all happens with the action - 'cannot find swatch' is all that happens and the layers do not get renamed.
Can someone please help with this.
Take care
Alan
I have had some flaky behaviour… Sometimes the action has an error… then the next time it plays perfectly!
SWF video files, so no good on iOS devices:
Manual Run
http://www.screencast.com/t/9xDw04MI
Batch Run
Copy link to clipboard
Copied
Which version of Illustrator are you using?
Are you sure that you are trying to rename layers? Or are you perhaps talking about objects? You can check that by double clicking the item in the Layers palette: It is an object if an Options dialog pops up. It is a layer if a Layers Options dialog appears.
To what shape are you trying to apply a spot colour? What do you mean by "defined the spot colour - set it to persistent"?
Can you share a sample .ai file with some further instructions?
Copy link to clipboard
Copied
Thanks for your reply. Firstly, it is not an AI file.
I am opening a Photoshop file with 2 named layers - these layers have to exactly named so that a cutter recognises them.
When you open a PSD file in Illustrator as objects - Illustrator in it's confounded wisdom tags the end of the layer name with 'image.'
For example - if my layer in Photoshop is named 'CutContour' Illustrator will rename it 'CutContour Image.'
As a consequence of this completely stupid idea by whatever idiot at Adobe decided this would be a useful idea - I have to rename the 'LAYER' (not object) as when I save this as a PDF I want the named layers to show up exactly as they should in the PDF file.
It doesn't appear to be possible.
I have 2 layers - the top layer should be named 'CutContour' and the bottom layer should be named 'New Quickset.'
Also, on the CutContour layer I have an object which is a rounded rectangle - I need to a apply a Spot Colour to this which is 100% Magenta so that when I save this as a PDF file with layers - it shows up as a 'Spot Plates - CutContour.
I can't believe this is such a convoluted and difficult exercise - any help would be appreciated.
And yes, it is a layer I want to rename. It is the top level layer name I need change.
Thanks
Alan
Copy link to clipboard
Copied
Can you open one of your .psd files, save it as an .ai file and then post a download link? I'd prefer to take a look at a sample file, rather than guessing.
There should be a way, even if it is not as straightforward as you may expect.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
As far as I see it can be done with a rather simple action.
I will post a sample action tomorrow or on Monday. In the meantime you may get other approaches by other forum contributors.
Copy link to clipboard
Copied
A rather simple action... Well I would love to see the solution. Thank you Kurt. Any possibility at all (if it is so simple) you could put it together tonight?
Thanks for your help.
Alan
Copy link to clipboard
Copied
I could, but I'm just going to visit a garden party and I'd rather avoid to run late again.
Copy link to clipboard
Copied
Based on your sample file you can download a sample action here:
Rename_and_apply_spot.aia.zip - Google Drive
How to use:
Unzip the .aia file and import it into the Actions palette. Open the document, make sure that the topmost layer is highlighted in the Layers palette, then run the action.
Remember that Illustrator actions sometimes tend to start stuttering when you run them accelerated. If that happens you can go to the Playback Options and make sure that they run at a leisurely pace.
Copy link to clipboard
Copied
Hello Kurt - I hope you had a great garden party.
The action works fine for renaming the layers but when it comes to applying the swatch - the same error occurs, 'cannot find swatch.'
Also, you mention selecting the top layer - for me to batch process the action which is what I need to do - the action really needs to 'select' the top layer automatically.
I notice that whatever PSD file is opened - it automatically selects the bottom layer - if that helps.
Thanks very much for your efforts.
Alan
Copy link to clipboard
Copied
The garden party was fine. Just a bit rainy.
I don't get the Cannot Find Swatch error and the action runs smoothly (using the latest CC version of Illustrator).
Which Illustrator version are you using? Also, which layer is highlighted when you open the file?
Can you share a sample .psd file?
Copy link to clipboard
Copied
Hi Kurt. It is the latest version of Illustrator CC.
Here is the link to the PSD file:
I don't know why this happens with the swatch.
The bottom layer is selected - highlighted when the PSD file is opened in Illustrator.
Even if you create an action that creates the swatch each time the action runs it doesn't work.
Did you make any changes to the AI file I sent over? Where did you save the swatch?
Thanks for your efforts Kurt. I really appreciate it.
Alan
Copy link to clipboard
Copied
I think a couple of things have to be clarified now.
First off, no, I didn't change your sample .ai file. I just used it as a reference to make the action which should work with that file and with other files sharing the same structures. I'm pretty sure it will also work for you if you run it in the .ai file you provided yesterday. Have you already tried that or have you only tried it with a .psd file opened in Illustrator?
If the latter applies, then of course the action won't work (or only partially), just because there is no spot colour swatch in the main Swatches palette, hence it cannot be applied by the action.
In your initial post you told that you’ve already created a (persistent) spot colour swatch. In post 1 I’ve already asked what you mean by „persistent“ in this context. You would have to answer that. My guess is that you just opened a swatch colour library and set the library palette to persistent, but I’m not sure about it.
Furthermore, in your sample .ai file there is only one raster image inside the topmost layer. When opening the .psd file there is a compound shape in that layer. Obviously a difference and it’s important to know that. Otherwise it is not possible to make an appropriate action.
Now, can you declare that the .psd file is a representative reference? If so, I may want to cobble together another action.
Copy link to clipboard
Copied
My guess is that you just opened a swatch colour library and set the library palette to persistent, but I’m not sure about it. You guessed right - there is no other sense the term persistent applies when talking about swatches. I assumed that this would open the swatch each time Illustrator is launched - I was wrong!
See screen shot - cannot find swatch.
As I mentioned before, I am opening PSD files so it makes sense that the action is applied to the PSD file but you asked for an AI file.
Regardless, as you can see in the screenshot the same error occurs.
Sure, if I select the top layer the action will rename the layers correctly but this defeats the purpose of this exercise. I want the action to do everything without user input so it can be batch processed.
It would be great to know how to make the action to rename the layers this is the purpose of my post - to learn and not have an expert do it for me.
I have even tried creating an action the creates the rounded rectangle and then creates and applies the swatch but to no avail.
Thanks Kurt.
Copy link to clipboard
Copied
Initial thoughts/questions:
1) Why take the PSD file into Illustrator (is it just to make a spot colour path)?
2) Do you have Acrobat Pro?
3) Do you really need layers, or will the spot colour be enough? Is it just that you need the 100%M fill shape from Photoshop coloured as a spot colour called “CutContour” for a cutter path in say VersaWorks (can it be a fill with no stroke, or does it have to be a stroke with no fill)?
4) What is the bare minimum result and or must have steps (i.e. spot vector path), vs. nice to have (i.e. such as layers)
5) Perhaps Illustrator is not be the best place to perform this task.
Copy link to clipboard
Copied
Scripting would be a better solution, however for those of use that can’t script or wait for the generosity of those that can, alternative methods are required…
There may be a better action method, this is just what I came up with first that actually worked as intended!
You can download the zipped action here:
Explanation (as you wanted to learn rather than just have the work done for you):
1) Edit the new document profile for “print” to include the required spot swatch. This is on the Mac OS from within the user library, you will need to search for the location or file on your system if you are Win OS based:
Now whenever a new doc is created using the “print” new document profile, the required swatch will be included.
2) Before running the batch action, create a new doc using the “print” profile to prime/preset, don’t save this file, it is just a means to an end.
3) Before running the batch action, first run the first action “01 - Prime Batch” in the downloaded action set:
This “01 - Prime Batch” action is used to prime/preset the clipboard with an object containing the spot colour CutContour, don’t save this new document, it is just a means to an end.
4) You will need to delete and resave the final action step in second action “02 - Batch Run” so that the save path and file format is correct for your operating system.
5) Use the Action’s Batch command to run the second action “02 - Batch Run” to batch save the source files.
Ensure that when using the Batch command, that you are overriding the action save commands so that the batch output path is used and not the recorded path (the file format will still be used though).
6) Enjoy! Let me know if any step or methodology needs a deeper explanation.
Copy link to clipboard
Copied
Thanks for your efforts - the same error occurs 'cannot find swatch.'
This is really more hassle than advantage.
I will just open the PSD files in Illustrator and edit them manually - the difference in time between this and running an action ..... I don't know - they are large files.
FYI - I need to open the PSD fie in Illustrator so I can apply the spot colour to the rounded rectangle shape and save it as a PDF with layers - Adobe in their wisdom did not include this option with saving PDFs in Photoshop.
Thanks very much for trying to help.
I cannot believe why this is so convoluted and difficult - 2 simple things rename 2 layers and apply a custom spot.
UNBELIEVABLE !!!!
Alan
Copy link to clipboard
Copied
Thanks for your efforts - the same error occurs 'cannot find swatch.'
Did you preset your system as in steps 1-3? It should work without error if the first three steps are correctly followed from my step by step. I did test this thoroughly.
You could just as easily open any file and copy/cut the object that had the correct CutContour spot colour applied, before running the batch.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Please try this file.
It doesn't work - many errors occur.
There are obviously differences between this file and the previous file.
EDIT: I just retested both files, all works perfectly, no errors and the final batch result is a correctly named layered PDF with spot colour stroke on the CutContour path.
I have my “print” new document preset in place.
I ran the step 1 action based off the new print preset to create a new file using the CutContour colour, it then correctly create a new object using this spot and copied it to the clipboard with no errors.
With the clipboard now primed with this data, I then ran the second action over the file and also via action > batch on two files, it ran without any errors… However due to the structural differences between the initial sample and this file the spot was not applied correctly.
EDIT: It all seems to work as intended. I can record a video of the process if you like!
I don’t have time at the moment to troubleshoot for you, time permitting I’ll try to see why this works perfectly on the previous sample and not on this one.
EDIT: Perhaps somebody else could test my action and step by step instructions from reply #15 on your supplied file.
As I previously mentioned, I personally would choose a different form of automation for this task.
Good luck!
Copy link to clipboard
Copied
EDIT: It all seems to work as intended. I can record a video of the process if you like!
yes please - that would be great.
Copy link to clipboard
Copied
I have had some flaky behaviour… Sometimes the action has an error… then the next time it plays perfectly!
SWF video files, so no good on iOS devices:
Manual Run
http://www.screencast.com/t/9xDw04MI
Batch Run
Copy link to clipboard
Copied
I am wondering if the flaky action playback behaviour was due to the use of “accelerated” playback mode, as discussed in the following topic there appears to be some inconsistent behaviour in this playback mode:
https://www.linkedin.com/pulse/illustrator-variable-data-bringing-editable-assets-vasily-hall
Copy link to clipboard
Copied
Ha, how relevant my latest post turned out to be, to this thread!
Yes, in my production art days, setting the appropriate "CutContour" was paramount: any problem with spelling, the color values or other issues would result in a printout of a decal with no cutlines, wasting expensive inks, adhesive paper and production time.
One of the earliest methods I implemented to ensure that everyone would always create the proper swatch was to record a "Place" command which would place into the document, and then delete, a .ai file containing but one square with the cyan-colored CutContour spot color. As the cutline-making actions I subsequently created used this step as the primary event, it was working well when applying the swatch to art.
I think my main point was: use the Place command instead of opening a file, because spot colors automatically appear in the document when they are visible inside a placed item that's placed into the document. This seems like the method to avoid Accelerated playback mode bugs related to opening a document, maybe.
Copy link to clipboard
Copied
To apply a custom spot as part of an action, try this:
Create a document with an object that uses the required spot color. Save it in a permanent location.
As part of the action, record something like this:
1. Open file (the document using the color)
2. Select all
3. Copy
4. Close (without saving)
5. Paste
6. Delete
The document will now have the custom spot color.
Good luck!