Script of recolor artwork for compound paths

Hi,  there,
  I tried to write some script to recolor my art work.
  Basically I only have path and single colour compound path in my layer.
  For path its easy:
  if ( mypath.name == 'some name ') mypath.fillColor = myColor;
  while for compound path it's not that easy. Throughout my search, I didn't find some methods that can do something like this:
myCompoundPath.fillColor = myColor;
  then I tried to simulate the procedure of that in the ui : select the compoundPath -> click "recolor artwork" -> change the colour.
  and there s still no such methods were found.
  I m wondering is there any way to do this?
  Thanks a lot.

check this thread for a sample of how to do it
Change color of compoundPathItems created by converting Text to Paths using createOutline()

Similar Messages

  • Cannot recolor artwork for all objects in Vector?

    Hello All,
    I used Live Trace to create a Vector. On some of the objects in Vector I can recolor artwork, but others there is no options to recolor. Does anyone know why and is it possible to see recolor options for all objects?

    Recolor artwork is a great tool for recoloring specific colors in the artwork without having to select specific objects and and change the swatch used for that object. If you select all, and enter the recolor function you should see all the swatches for all the selected art, and change a swatch color throughout the artwork. There is much more to this function, but for what you're doing this is a quick easy way to effect color changes to all objects colored with a specific swatch. Check the on line help, Help>Illustrator Help for more on recoloring.
    Here is a Tutorial if you're intrested too.
    http://rwillustrator.blogspot.com/2009/01/tutorial-recoloring-artwork.html

  • How to release Compound Path in Adobe illustrator javascript

    Hi,
      How to release Comound path with java script

    Thanks For answer
    Actually i want to take .PNG image for compound path Items.
    But when i release compound path Items then it is break in small small object.
    When i save compound path items separately it saved as a blank image...
    What am i do now.

  • Compound Path - determine  winding rules

    I have a compound path, and i need to parse all points, for export to CANVAS HTML , for this I wrote this script:
    But the problem is how to detect the holes. I find information, and i think that i need the fill rule or clockwise fill, but in the reference doesn't exist.
    Somebody can help me. Thanks
    Compound Path fill rules:  http://forums.adobe.com/message/4507598?tstart=0#4507598
    Nonzero winding fill rule
    Uses mathematical equations to determine if a point is outside or inside a shape. Illustrator uses the nonzero winding rule as the default rule.
    Even-odd fill rule
    Uses mathematical equations to determine if a point is outside or inside a shape. This rule is the more predictable rule because every other region within an even‑odd compound path is a hole, regardless of path direction. Some applications, such as Adobe Photoshop, use the even‑odd rule by default, so compound paths imported from these applications will use the even‑odd rule.
    http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-6462a .html#WS714a382cdf7d304e7e07d0100196cbc5f-644ea
    http://www.fireworkszone.com/tuts/476/fill_rules.pdf
    /*bool*/ Polygon.prototype.collideShapes = function(/*Polygon*/ _poly)
    // Ret. TRUE if the shapes intersect
    // slow method
    try {
         this.intersectPath(_poly);
         app.activeDocument.undo();
         return(true);
    catch(ex)
         return(false);
    var selection = app.activeDocument.selection;
    var a= selection[0]
    var b= selection[1]
    //alert( a.collideShapes(b))
    function inArray(agulla, paller){
        var length = paller.length;
        for(var i = 0; i < length; i++) {
            if(paller[i] == agulla) return true;
        return false;
    var item  = app.activeDocument.selection;
    var items = item[0].releaseCompoundPath();
    var restantes = items;
    var groups={}
    var i = items.length;
    //          while( i-- )
    for (var i=0;i< items.length;i++)
                        a = items[i];
                        try{
                        $.writeln( items[i].LocalDisplaySetting          )
                        }catch(e){$.writeln( e)}
    for (var s=0;s< restantes.length;s++){
    var b = restantes[s]
    if(a!=b){
    if(inArray(b, restantes)== true){
    try{
    if(a.collideShapes(b)){
    if(typeof groups[i]== "undefined"){
    groups[i]=[]
    groups[i].push(i)
    groups[i].push(s)
    restantes[i]= "void";
    items[i]= "void";
    restantes[s]= "void";
    items[s]= "void";
    catch(e){}
    app.activeDocument.undo();
    for (var t=0;t< restantes.length;t++){
    if(restantes[t]!= "void")
    $.writeln ( "_" + t +",");
    for(var g  in groups){
    var group = groups[g]
    $.writeln ("var compoundPath = new CompoundPath( _" + group.join(", _") +").fillColor = 'red';");

    I just want all inner shape and overlapping shape areas to be considered the composite fill of the compound shape - so in my example above, the three red rectangles lacking a centerpoint I want to contribute to compound path's composite fill, instead of knocking it out.
    BTW, that example up there has a big outer stroke, no fill. Maybe confusing, but that's how I'm currently using the shape (to mask the outsides of 3 different designs).

  • How to save custom presets in Recolor Artwork?

    I'm using Illustrator CC 2014 18.1 on a Windows machine and I would like to uncheck the 'preserve white and black' boxes in the Color Reduction options of Recolor Artwork and save it as a preset. PFA, the image for reference. The default settings load up every time illustrator is launched. Having to change it every time is pretty inconvenient.
    Also, have the issues with actions that use scripts been resolved? My actions that have scripts do not load on every launch.
    Thank you for your help.

    Hi Monika
    Tried reading the prefs file, and the only thing I could find closest to the Color Reduction Options panel was this:
    /ColorHarmony {
        /HarmonyDialogRecolorArtCheckbox 1
        /ShowStorage 1
        /ShowAdjustSliders 0
        /SliderColorSpace 3
        /mapMethodPreserveSpots 1
        /mapMethodApplyToAll 1
        /combineTintsOnExtraction 1
        /ShowHideColorGuide 1
        /VariationTypeColorGuide 0
    looks like the Recolor Artwork panel with the Recolor Artwork Checkbox option. Any suggestions?
    @Ton, have filed the same. Looking forward to seeing it sorted out.

  • CS4 Select all compound paths?

    Hi all,
    There was a fab plug in set by Rick Johnson/Graffix called Select Menu. It is not yet updated for CS4.
    The only function from the set I truly need is the ability to select all compound paths. Just wondering if it is possible to do this with a script? I recently found a javascript to close all open paths, so that got me thinking there may be a way to select the compound paths with a script as well...
    The nice thing about scripts is they still seem to work even after a program upgrade. All my little applescripts are still working fine but my plugins are DOA in CS4. So I am thinking it would be great to have functions I depend on every day in script form.
    I also wondered if there is a way to call the script with a speakable items command, which I guess would mean creating an action to run the script that I could then assign to a function key...?
    So far I have not found a way to call a script in Illustrator using a speakable item.
    I have near zero scripting experience so apologies if this is an annoying stupid newbie question. I have RSI issues and need to do most of my work via voice commands... it can be challenging to figure out how to do these things since my expertise is in graphics, not programming.
    Thanks for any swift kicks in the right direction!!

    Hi,Thanks!!
    This does work but on a complex document it is very slow as it seems to be redrawing all the compound paths? It worked fine on a simple file but when I tried it on the kind of complex file I would actually use it on it has Illustrator hung up with a spinning beach ball....
    The Graphix plug in to select all compound paths worked instantaneously. Is there a different way to write this that would not be as processor intensive?
    Ah, the beachball just stopped spinning and all the correct paths are indeed selected...

  • Making a clipping group with a compound path

    So, as of today I'm new to scripting for Illustrator, I'm using the ExtendScript Toolkit. However I'm not new to scripting my own solutions and I do have some experience with JavaScript already.
    What I'm trying to do is this: For all selected Items->Duplicate selected item and make a simple clipping group with it
    What I end up with visually doesn't change the picture, but gives me a lot of clipped colored areas which I then can edit in the isolated mode, allowing me far faster and better shading. Doing that by hand takes hours on some pictures, it'd take a second with a script.
    The script itself already perfectly works for normal PathItems. As obvious in the title, as soon as I have to apply the same to CompundPathItems things stop working. My issue is somewhat similar to this old thread [Problem with compound path clipping], but I couldn't find a solution there because I get different behavior.
    When I run the very same script that perfectly works with the normal PathItems with CompoundPathItems I get this: Error 9046: The top item in the group must be a path item to create a mask
    Well that's a problem. In the GUI there is absolutely no difference between making a clipping mask with a simple path and a compound path. The reference guide has frankly not helped me with this issue at all, the only thing I learned from that is that the CompoundPathItem object doesn't have a clipping attribute, but those included PathItems do.
    Here's what I have so far:
    if ( selected[i].typename == "PathItem" ) {
    var newGroup = doc.groupItems.add();
    copy = selected[i].duplicate(newGroup,ElementPlacement.PLACEATEND);
    selected[i].moveToBeginning(newGroup);
    newGroup.clipped = true;
    As I said, this part perfectly does what it's supposed to do for normal Paths.
    For CompoundPaths I use this workaround.
    if ( selected[i].typename == "CompoundPathItem" ) {
    var newGroup = doc.groupItems.add();
    copy = selected[i].duplicate(newGroup,ElementPlacement.PLACEATEND);
    selected[i].moveToBeginning(newGroup);
    compoundItems = selected[i].pathItems;
    compoundIndex = compoundItems.length;
    for ( f = 0; f < compoundIndex; f++ ) {compoundItems[f].clipping=true;}
    var lineList = new Array(10);
    for ( l = 0; l < lineList.length; l++ ) {lineList[l] = new Array( i * 10 + 50, ((i - 5) ^ 2) * 5 +50);}
    newPath = app.activeDocument.pathItems.add();
    newPath.setEntirePath(lineList);
    newPath.moveToBeginning(newGroup);
    newGroup.clipped = true;
    newPath.remove();
    Mind you, this workaround does work in so far that it bypasses that annoying and wrong error, and the Compound Clipping Path also works, with the only problem being that the Compound Clipping Path created like this is still displayed in its original colors in the Layers section, and is still selectable. When I lock the Compound Clipping Path I can work with it but still...
    So the question is, what am I missing here? Surely there must be a proper way to do this.

    app.executeMenuCommand()? That one eluded me so far, might be just the right thing. I'll definitely take a look, now just to find a ref on that, as unfortunately the official ref documents I have don't mention that command. Any place with a list of possible commands?
    Ah, also of course I'm not only doing it for the isolation mode. If you care to hear the background, here is it:
    As I said it's for shading the pictures I'm working on. I've iterated and tried through a bunch of techniques. For example gradient meshes on my first few real works. Now those meshes don't do well with complex shapes, which previously I alleviated by using a simple square or rectangle gradient mesh and using the original colored shape as a clipping mask. That did work, but it was a huge lot of work.
    After a bunch of attempts at that I went over to using simple gradients as a background for the shape and then I'm doing the shading freehand with the blob brush tool, using a graphic style and filters to make it look right. That's better, but properly making all the clipping masks takes me much longer than anything else.
    Now the problem is that the shading is not supposed to go over the lines, which is impossible to do properly without either messing up the order, or using clipping masks, hence the script. Because you know, if you use a blob brush with a strong Gaussian blur close to the lines you'll end up with stuff on both sides. If you don't start close to the line the shading won't look right if the darkest part of the shade needs to be close to the line. And that's where clipping masks do magic.
    And finally here's an example how I work with the script and the result:
    After I have traced a sketch, adjusted the line widths and everything to look neat I turn the paths to outline strokes and then make them into a live paint group (which would mess up the line widths, unless you turn the paths into outline strokes first).
    With that live paint group it takes me just a few minutes to flat color my piece. Then I expand the live paint group, in case of doubt spend some more minutes to make compound paths from all areas I need to shade in one piece, then I select all the areas and use my script to turn them into neat clipping masks. Then I can click any area, enter the isolation mode and go up one level so I'm in the appropriate group, where I can shade freely without the problem of going over the lines.
    At the end that allows me to apply a complex and in-depth shading, without wasting any time to get there.
    PS: Well, I just found out that Draw Inside is pretty darn close to what I want to do, and oddly enough it produces the same visual discrepancy with compound paths that my script produces. I'll be taking a closer look at that, though my script does a little more than just the clipping mask stuff, so maybe I'll go for a hybrid solution. Whatever makes for a better workflow.

  • Compound path and live fill problem

    Hello experts
    I really hope you can help me out with this one. I'm all new to Illustrator and have tried to find the answer to my question but without luck, so you are my last way out
    I'm currently working on a logo of a football which I have drawn with the line segment tool. A football is made of pentagons and hexagons, and I want all the pentagons to have a color fill. For that I have used the live paint bucket. But if I apply an effect such as a gradient it is applied to each segment as many seperates. I then read that you could use compound path and that works with my lines but not with the live fill. Is there a work around for my problem or do you have any smart suggestions of what I could do ?
    Thanks for your help in advance
    Kind regards
    Christopher

    A few questions:
    What AI version?
    By "Live Fill" are you refering to "Live Paint"?
    CS 6 lets you fill a stroke with a gradient. That may be what you used here.
    Congratulations learning about "compound paths" on you own. That's a step in the right direction.
    You can control a gradient fill across multiple objects by using the "Gradient Annotator" (under "View" or "G"). This allows you to set a gradient start and end point by dragging across your selected artwork. You can also edit the gradient sliders directly on the annotator.
    If you ARE using "Live Paint", you can use the "Live Paint Selection Tool" (hidden under the Live Paint Bucket tool, or "Shift-L"), to select multiple Live Paint segments, then drag the annotator across all segments. The annotator is hidden when used with Live Paint (at least in AICS5).
    I hope these tips are helpful.
    Ray

  • How to cut a hole that is part of a compound path

    I have spent many hours using all the tools available in Illustrator CS4 to reshape the hole that is part of a compound path with no success.
    The compound path consists of a square with a round hole, I want to for example, cut the round hole in half. Erase, Knife, Pathfinder do not work. I can do it if first release the compound path, cut the round hole, then make compound path again. While this method is easy for this example but not good for very complex drawing, because it would be too time consuming to convert back and forth the compound paths and remembering which holes belong to which compound path. Please help. I am to the point where I am willing to spend money to get a good cutting tool plugin, any reccomendation?

    Sure....
    Place or Open raster image.
    Live trace (whatever settings you like) I'm assuming it's a 1 color trace (line art) and not a photo or color image
    Click the "Expand" button in the Control bar
    Everything should be selected/highlighted
    Click the Merge button on the Pathfinder Panel (3rd from left, bottom row)
    *optional -- Choose Object > Ungroup from the menu (Using Pathfinder command creates Groups for some reason. These groups aren't always needed.)
    Deselect all (Command-Shift-A or Ctrl-Shift-A or just click somewhere empty to deselect the artwork)
    Select the Direct Selection Tool (the white arrow)
    Click the center of a "hole" or counter. This will select one of the superfluous white shapes.
    Choose Select > Same > Fill & Stroke from the menu. All the extra shapes should highlight.
    Hit delete.
    You should be left with just black compound paths with no superfluous shapes anywhere. In fact, after this if you Select All, the color panel shoudl show a simple black fill and no stroke. Of course, this somewhat depends upon your Live trace settings.
    What this does is merge all black and white shapes into the simplest form and at the same time it cuts through bottom objects with top objects. So if you have a white shape sitting on top of a black shape, it cuts that white shape out of the black. This ensures all the black has the correct compound shape assignments. Sometimes with Live Trace you can get white fill areas and not get the corresponding compound hole below it. Or the compound hole will not be exactly the same shape as the white object sitting on top of it. Using Merge corrects that. Then deleting the white shapes just removes all the unnecessary objects. If you want a color for the compound holes, just draw a rectangle or shape below the black and fill it with any color. All you need to is alter the counters or compound holes now to correct anything. No more double paths.
    All these steps are not always necessary. But it's sometimes good practice depending upon what you are tracing. Once you do it once or twice you'll see it's only about a 1-2 minute processes and most of that will be waiting for the Merge command to complete.

  • Calling actions and release compound path (CS4)

    Is there any way to call an action using Illustrator script?
    I can call actions in Photoshop so why is it not working for Illustrator?
    Also, how to script 'release compound path' in Illustrator. Usual method not working...
    Juz0

    Can you NOT just move the compoundPathItem's pathItems to another location before/after? Kind of like this…
    #target illustrator
    var docRef = app.activeDocument;
    with(docRef) {
         with(compoundPathItems[0]) {
              var x = pathItems.length;
              for (var i = x-1; i >= 0; i--) {
                   pathItems[i].move(compoundPathItems[0], ElementPlacement.PLACEBEFORE);

  • Adding multiple paths into a compound path

    If I use the gui to add multiple paths into a compound path all I have to do is select multiple paths and choose Object->Compound Path->Make (or ctrl-8). When I do this then the bottom path which is filled has holes 'punched through' creating a window in the shape of the smaller paths which were on top of the larger one. For example, a large rectangle with a white fill color is the bottom item and two smaller paths are on top. I create a compound path and whatever is below the new compound path shows through in the largest shape of the previous two smaller paths.
    If I use JavaScript and create a new compoundPathItem and move 3 paths into it, with the largest being first, then I get a compound path but only the first of the smaller objects creates a transparent space.
    Here is a simplified example:
        var grpMask = doc.groupItems['mask group'];
        var compound = grpMask.compoundPathItems.add();
        var pathobj = grpMask.pathItems['bigbox'];
        pathobj.move(compound,ElementPlacement.INSIDE);
        pathobj = grpMask.pathItems['PathLeft'];
        pathobj.move(compound,ElementPlacement.INSIDE);
        pathobj = grpMask.pathItems['PathRight'];
        pathobj.move(compound,ElementPlacement.INSIDE);
    In the above example the 'bigbox' path has the left and right paths on top of it but only the left path creates a transparent space in the original box.
    I also tried using PLACEATEND instead of INSIDE and grouping the two smaller paths together and moving the group to the compound path.
    Merging path items together won't work - I want to keep the original path's closed and intact without drawing a line between them so I can't just add their pathpoints together.
    Is move() the best way to add existing paths to a new compound path?
    Thanks!

    Im at work at the moment so only have access to CS2 where the second script works… The first script worked at home with CS5…
    here were my test files… Before
    and After…
    As you can see with this I did not change the polarity of the last path as in this test case I knew it was the largest of the shapes not sure if that had any bearing on my results…?

  • I'm having trouble finishing up with Compound Paths

    OK, I'm a novice here so here's my script. It works really well like it sits. It basically takes two objects in a large group and aligns them. I want to make each two objects combinded into a single compound path. I have tried multiple things and they all just kick out errors and what not. I can't seem to get my head around the vocabulary for the scripting but the darkness is starting to fade the more I do.
    #target Illustrator
              var idoc = app.activeDocument;
              var pi =idoc.compoundPathItems;
              var numn = prompt ("How Many Names?", "Enter Number of Names");
              var dd = prompt ("How far below name is the number?", "Enter Drop Distance");
              var nH = prompt ("How tall are the names?", "Enter Name Height in Inches");
              dd = parseFloat (dd);
              numn = parseInt (numn);
              nH = parseFloat (nH);
    for (j=0; j<numn; j++) {
                        var num = j + numn;
                        var numpath = pi[num];
                        var npath = pi[j];
                        var nName = 'name' + j;
                        var numName = 'number' + j;
                        var centWidth = pi[j].width / 72;
                        var centN = pi[num].width / 72;
                        var adjNum = (centWidth - centN) / 2;
                        var fhp = j*9.5*72;
                        var fvp = 0;
                        var nhp = (j*9.5*72) + (adjNum * 72);
                        var nvp = ((dd*72) + (nH * 72))*-1;
                        pi[j].name = nName;
                        pi[num].name = numName;
                        npath.position = [fhp,fvp];
                        numpath.position = [nhp,nvp];
    // Would Like to combine the aligned items into a single compound item.

    select few objects and try this to build up a new compound path.
    #target illustrator
    var doc = activeDocument;
    var sel = doc.selection;
    var newCompPath = doc.activeLayer.compoundPathItems.add()
    if (sel.length > 0) {
       for (var i=0; i<sel.length; i++) {
            sel[i].evenodd = true;
            sel[i].move(newCompPath, ElementPlacement.INSIDE);

  • ITunes 10.0.7.21 shows a white box instead of artwork for most of my albums.  Many of these are albums I purchased on itunes.  Also when I hit get album art it deleted the artwork it already had form many albums and says it cant find it.

    OS is Windows 7
    I updated iTunes the other day and I decided to run "get album art" and instead of finding artwork, it made some of the artwork I already had show up as white squares, or disapear entirely.  The ones that are white squares show up under the get info, but not in itunes.  I did click in view for show al artwork, no luck.  Many of these albums I bought from iTunes.  The ones that the artwork was deleted some albums I can buy on iTunes, but already owned, and iTunes found the artwork before, but now cannot.  Some are albums that I spent many hours finding and adding the artwork myself.  I am very frustrated.  I cannot find the time to manually install artwork for thousands of songs.
    My work computer is Windows 8, so I really don't want to hear windows vs OSX argument.  My company won't switch to mac because you like it better, so I just need a solution to my issue.  iTunes it has always worked better for me on my work PC than my macBook, I dont know why, but I don't take two laptops with me when I travel so I have my iTunes library on the PC that has to come with me.  This is the first time an update has screwed things up for me.

    Well my first guess was wrong. The line that failed is the one that writes out the image to disk. I've not revisited the code for that script for ages, but it seems I did add in an extra test for missing files a little while later, then forgot to upload the change. I can reproduce the error message if I deliberately rename a file to confuse iTunes so that seems the most likely reason for your problem with the script. I've uploaded a new build of CreateFolderArt which should work better.
    See FindTracks for a tool to repair broken links. You should probably get that issue fixed first.
    I know what SPSS stands for but that is all I know about it.
    tt2

  • [CC] How to perform a script "foo_beforeSave.htm" only for specific site?

    Since a long time I use a script for automatic text replacements which perform with each save command.
    The script sits in that folder:
    C:\Users\myusername\AppData\Roaming\Adobe\Dreamweaver CC\de_DE\Configuration\Commands\foo_beforeSave.htm
    It works for all documents of all sites.
    The source code (the regex rule is just an example) of the script you find below.
    My question:
    I like to perform a script like this only for a specific site.
    I'm not a programmer. So I don't know where to place the script to reach that target. Or how I have to edit the source code of the script.
    Is there anybody who could help me with that please?
    I would appreciate it a lot. Thanks
    <!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//dialog">
    <!-- MENU-LOCATION=NONE -->
    <html>
    <head>
    <title></title>
    <script src="../Shared/Common/Scripts/dwscripts.js"></script>
    <script>
    function canAcceptCommand(){
        return true;
    function getFileName(url) {
      var index = url.lastIndexOf('/');
      if (index != -1) retVal = url.substring(index + 1);
      else retVal = url;
      return retVal;
    function runCmd(){
        var dom = dw.getDocumentDOM();
        dom.synchronizeDocument();
        var path = dw.getDocumentPath('document');
        if(getFileName(path) != 'foo_beforeSave.htm'){
            var docEl = dom.documentElement;
            var tempDoc = docEl.outerHTML;
            tempDoc = tempDoc.replace(/&bdquo;/g,'„');
            tempDoc = tempDoc.replace(/&#8222;/g,'„');
            tempDoc = tempDoc.replace(/&ldquo;/g,'“');
            tempDoc = tempDoc.replace(/&#8220;/g,'“');
            tempDoc = tempDoc.replace(/&rdquo;/g,'”');
            tempDoc = tempDoc.replace(/&#8221;/g,'”');
            docEl.outerHTML = tempDoc;
    </script>
    </head>
    <body onLoad="runCmd();">
    </body>
    </html>

    Well, the posted script is a full working one.
    I just search for a way to limit the range of the script to the actual site.
    Therefore it is unimportant, which regex is in the example.

  • How do I create an automator variable for a path that includes a date?

    I like to use Image Capture to scan documents into a hierarchy of folders under my ~/Documents directory that are organized by year and document type.  For example, I have
    ~/Documents/archives/2011
         /Misc
         /Utilities
    and
    ~/Documents/archives/2012
         /Misc
         /Utilities
    for archiving miscellaneous docs and utilities bills. Now, switching folders in Image Capture is annoying so I want to use the Automator support built into that app to direct the scanned images to ~/Documents/archives/<Current Year>/Misc or ~/Documents/archives/<Current Year>/Utilities.  I was able to do this with separate Automator workflows, each with a hard-coded path to the destination folder.  For example,
    What I would like to do is use an Automator variable to dynamically determine ~/Documents/archives/<Current Year>/Misc.  I see variables for Home, Documents, and Current Year.   However, when I try to create a new path variable it only lets me choose a full path to a Finder folder.  How do I combine Documents and Current Year variables with the "archives" and "Misc" folder names to create a new path variable?

    Well now, you went and made me learn something today.  In the Variables Library, under Utilities, is a variable named AppleScript.  You can put a small script into this that evaluates to your path, for example:
    ((((path to documents folder) as text) & "archives:" & (year of (current date)) as text) & ":Utilities") as alias
    If the script evaluates to a proper path, it can be used wherever any other path can - you can experiment by looking at the results of a Get Value of Variable action.

Maybe you are looking for