Replacing all instances of a swatch with another swatch

Ok, this really has to be easy but I can't seem to find a way to accomplish this.
I have a swatch that's used throughout my document. Now I want to change all objects that use this swatch to use another swatch. How do I accomplish this?

Thanks Dave and Ken!
Dave, I tried redefining the swatch. But since it was a Pantone color I tried to redefine to (and that color swatch was already defined because I'd imported an object with that Pantone color) it wouldn't work.
Deleting the swatch and replacing it worked like a charm however. Thanks again!

Similar Messages

  • Replaces all occurnces of one String with another String in a given source

    Hi all I had found that there is a lot of interest int this topic. there is a little piece of code that I wrote for myself recently, so I fgigured that it might be helpful for some...
    This method will scan through a string "source", find all of the occurances of a String "before" and replace them with the "after".
    Enjoy :-)
    public static String replace(String source, String before, String after)
    StringBuffer sb = new StringBuffer(source);
    int startpos = source.indexOf(before);
    int endpos = startpos + before.length();
    int i = startpos;
    while( i > -1 )
         if( startpos > -1 && endpos <= source.length() )
         source = sb.replace(startpos, endpos, after).toString();
         int lastReplace = source.lastIndexOf(after) + after.length();
         if(lastReplace <= source.length())
              startpos = source.substring(lastReplace, source.length() ).indexOf(before);
                   endpos = startpos + before.length();
                   i = startpos;
         else
              i = source.length();
         else
              i = -1;
    return source;
    Oh yeah if you want, you can visit my site http://www.infobrokery.com it is where this code is used to replace the text URL with html.

    Since 1.4 the String class has a replaceAll method ...

  • How can I replace ALL Contacts on the iPhone with my MobileMe Contacts?

    I have removed all duplicates in AddressBook on my various Macs and have uploaded the master copy to MobileMe. I would now like to replace all Contacts on my iPhone with that MobileMe master.
    I have followed the steps in the KB article for syncing the iPhone but when I get to the step of turning on the iPhone Settings for the Contacts it looks like the sync wants to merge the contacts. Of course, I do not want to "merge" since that will reintroduce all those duplicates.
    I suppose I could manually delete each of the the hundreds of contacts that are on my phone until it is empty ... and then turn on the iPhone setting for Contacts. That way it will have no option other than "add." But surely there is a more efficient way.
    (FWIW, when I turned OFF the setting for the Calendar it did empty the iPhone's calendar, which is what I wanted. But it didn't do that for the Contacts -- I turned that setting off but I was not asked if I wanted to keep or toss the Contacts. They are all still on the phone.)
    This is an OG iPhone, if that matters.

    Matthew Smith wrote:
    ... The only way I can think of doing it otherwise is possibly by syncing via iTunes via another Mac OS X user account where the address book is empty and then deleting them there and resyncing. ...
    Brilliant! That worked like a charm.
    I created a new User Account on one of my Macs and logged into it. I connected my iPhone to its iTunes and checked my iPhone's Sync Contacts option in iTunes. Since that account's address book was basically empty (two dummy contacts, one for Apple and one for this new user), I ended up with only those two Contacts on the phone. Then, going back to my real User account (which does not have syncing turned on in iTunes) the phone synced nicely with the MobileMe account and populated the phone with all the MobileMe contacts and groups.

  • How do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    how do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    ok so i have my own i tunes library - how do i get all my old apps onto my new library?

  • I just replaced my ipod touch 2nd gen with another how can i get my itunes back

    i just replaced my ipod touch 2nd gen with the same model and cant seem to get my iyunes back

    Don't understand question, Changing iPod shouldn't affect iTunes on the computer you sync with.  Plug in new iPod, it should take you through some screens of options asking how you want to setup the new iPod.
    Just did this when going from 7+ year old iPod video to iPod Touch 5th gen.

  • How do I replace one JPanel on a JFrame with another?

    I want to replace one JPanel on a JFrame with a different JPanel when the user clicks on a certain menu item. The menu item is working corrrectly but I cant seem to repaint / refresh the component.
    My code is as follows:
    c.add(knotPanel, BorderLayout.CENTER);
    c.add(stepPanel, BorderLayout.NORTH);
         if (stepChoice != 9) {
         c.remove(ownPanel);
         c.add(lessonPanel, BorderLayout.EAST);
         else {
         c.remove(lessonPanel);
         c.add(ownPanel, BorderLayout.EAST);
         c.invalidate();
         c.validate();
         c.update(c.getGraphics());
    Any ideas?

    I think you should use CardLayout manager.
    With CardLayout you can switch beetwen JPanels without removing or adding.

  • Replace hex character in a string with another hex character

    Hi Guys,
    Heres a problem scenario, hex character 92 looks very much like hex character 27 (apostrophe).
    I need to write a program that can replace all hex character 92 to hex 27 in a string.
    Being a novice on the regular expressions, I would appreciate if somebody can show
    the exact syntax to to perform this replacement.
    Many Thanks
    -Anil

    I don't think you need to use regex to do this:
    String s = something();
    char a = 0x27;
    char b = 0x92;
    s.replace(a,b);
    And don't forget that since Strings are immutable you need:
    s = s.replace(a,b);to do anything useful.

  • Exchange RGB swatches with CMYK swatches

    Using ASE color swatches I am trying to figure out how to change the swatches in an existing document. Here is the scenario:
    We have created 2 custom ASE swatch panels, one Spot RGB and the other Spot CMYK. Both panels have the colors named the same. When I open an existing document that uses the CMYK swatches and try to load the RGB swatches using the Load Swatches pull down in the Swatches panel, InDesign will only update the unused colors. And it will not load the other RGB colors as copies. I have tried to start with the ASE RGB swatches pre-loaded into InDesign, but when I open the document, all those colors are replaced with the swatches used in the CMYK document. So, I cannot delete the swatch and replace it with the copy. Does anyone know how I can get around this problem? We want to be able to use different colors for web and print and we want to have a way to be consistent across documents and Adobe applications.
    Adobe InDesign CC
    Mac Os X 10.8.4
    iMac 27" 3.4 GHz Intel Core 7
    32GB memory

    Keep the document in color mode CMYK.
    Open the RGB image in photoshop, and convert to CMYK.
    Sample in Photoshop the color you need and write that down.
    Go to Illustrator and create a swatch with the color you wrote down.
    You cannot accurately sample colors from placed photos in Illustrator . Illustrator takes what is sent to the screen in RGB, and then converts that to your color mode. Do NOT use SHIFT eyedropper, though the color looks good your color will not match the CMYK values in your photo.
    Illustrator will not change your cmyk document color mode colors to RGB because you sampled with eyedropper. You most likely changed the mode of the color panel to RGB. The color panel should always match the color mode of your document, the panel is misleading otherwise.

  • How can I replace all music on my iPod with the music in my iTunes Library?

    My iPod Touch (5th Generation) contains all the music that I purchased on iTunes with my previous iPod. I managed to transfer all music, including those from CDs, from my old iPod onto iTunes (newest version), so I figured that I would sync my iPod to retrieve them. However, every time I sync my iPod with my music library, I get duplicates of the purchases that my iPod contains, but not of those from CDs. When I go onto the "Music" section in my iPod, no items are shown. I have all the music that I want sorted out in my iTunes Library, so I want to replace only the music on my iPod with the music in the Library. How do I do this, or at least delete the music on my iPod (but not iTunes) so I can sync the entire music library later?

    Correction: The music on my iPod doesn't show up in the "Music" section in "iPod" in iTunes.

  • Compliance Calibrator 4.0: replace whole ruleset on one system with another

    Hi All,
    We have two R/3 environments (one's at 4.7 the other is 4.6c).  Both are running CC 4.0.  What's the best way to replace the whole SOD ruleset on the 4.6c system with the one from our 4.7 system.  When I say whole ruleset I mean all the risk, function, and business process area tables then regenerating all the rules.  I don't care if the 9-digit risk ID's are identical in each system. And I don't want to copy any of the mitigation information to the other system.
    I looked at the download/upload utility and it seems to deal with the generated rules.  The text files it downloaded do not appear to contain anything resembling the function or risk tables.  I assume we want to do more of an export/import activity similar to an upgrade conversion or new install (but using the risks and functions from our other system instead of the default set supplied by Virsa.) I can extract the tables I want (/virsa/bussproct, /virsa/funtiont, /virsa/functtcd, /virsa/functobj, /virsa/risks, etc.) and manipulate them into whatever is needed.  But I'm not sure how to delete the existing tables contents and import my data from the other system.
    Thanks in advance,
    Doug

    Hi Doug,
    How did you replace rule sets in one system from other system? Please explain if you have resolved your issue. I am doing same.

  • I recently got a new iPad and when synching it to my laptop I accidently clicked to replace all of my new information with the old. I had iCloud on the new one and there were many notes saved in it. How can I get them back?

    Everthing was replaced including the information under iCloud under settings. My iPad now states that I do not have my iCloud account set up on my iPad as on the old one I did not.

    Go to Settings>iCloud and set up the iCloud account you were using before by singing in with the same Apple ID.  Then turn the data you were syncing with your iCloud account back to On, and if prompted, choose merge.

  • HT3965 I plugged my husband's iphone into our computer after I plugged mine in and it replaced all his contacts and data with mine, how do we reverse this change?

    I plugged my husband's iphone 4 into our computer after I plugged mine in and it swapped all of his data/contacts out for mine, how do we fix this?

    How to use multiple iDevices with one computer

  • Stepping through a query result set, replacing one string with another.

    I want to write a function that replaces the occurance of a string with another different string.  I need it to be a CF fuction that is callable from another CF function.  I want to "hand" this function an SQL statement (a string) like this:   (Please note, don't bother commenting that "there are eaiser ways to write this SQL..., I've made this simple example to get to the point where I need help.  I have to use a "sub_optimal" SQL syntax just to demonstrate the situation)
    Here is the string I want to pass to the function:
    SELECT
      [VERYLONGTABLENAME].FIRST_NAME,
      [VERYLONGTABLENAME].LAST_NAME,
      [VERYLONGTABLENAME].ADDRESSS
    FROM
      LONGTABLENAME [VERYLONGTABLENAME]
    Here is the contents of the ABRV table:
    TBL_NM,  ABRV    <!--- Header row--->
    VERYLONGTABLENAME, VLTN
    SOMEWHATLONGTALBENAME, SLTN
    MYTABLENAME, MTN
    ATABLENAME, ATN
    The function will return the original string, but with the abreviations in place of the long table names, example:
    SELECT
      VLTN.FIRST_NAME,
      VLTN.LAST_NAME,
      VLTN.ADDRESSS
    FROM
      LONGTABLENAME VLTN
    Notice that only the table names surrounded by brackets and that match a value in the ABRV table have been replaced.  The LONGTABLENAME immediately following the FROM is left as is.
    Now, here is my dum amatuer attempt at writing said function:  Please look at the comment lines for where I need help.
          <cffunction name="AbrvTblNms" output="false" access="remote" returntype="string" >
            <cfargument name="txt" type="string" required="true" />
            <cfset var qAbrvs="">  <!--- variable to hold the query results --->
            <cfset var output_str="#txt#">  <!--- I'm creating a local variable so I can manipulate the data handed in by the TXT parameter.  Is this necessary or can I just use the txt parameter? --->
            <cfquery name="qAbrvs" datasource="cfBAA_odbc" result="rsltAbrvs">
                SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
            </cfquery>
         <!--- I'm assuming that at this point the query has run and there are records in the result set --->
        <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
        <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
        </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
            <!--- The chunck below is a parital listing from my Delphi Object Pascal function that does the same thing
                   I need to know how to write this part in CF9
          while not Eof do
            begin
              s := StringReplace(s, '[' +FieldByName('TBL_NM').AsString + ']', FieldByName('ABRV').AsString, [rfReplaceAll]);
              Next;
            end;
            --->
        <cfreturn output_txt>
        </cffunction>
    I'm mainly struggling with syntax here.  I know what I want to happen, I know how to make it happen in another programming language, just not CF9.  Thanks for any help you can provide.

    RedOctober57 wrote:...
    Thanks for any help you can provide.
    One:
    <cfset var output_str="#txt#">  <!--- I'm creating a local
    variable so I can manipulate the data handed in by the TXT parameter.
    Is this necessary or can I just use the txt parameter? --->
    No you do not need to create a local variable that is a copy of the arguments variable as the arguments scope is already local to the function, but you do not properly reference the arguments scope, so you leave yourself open to using a 'txt' variable in another scope.  Thus the better practice would be to reference "arguments.txt" where you need to.
    Two:
    I know what I want to happen, I know how to make it happen in another programming language, just not CF9.
    Then a better start would be to descirbe what you want to happen and give a simple example in the other programming language.  Most of us are muti-lingual and can parse out clear and clean code in just about any syntax.
    Three:
    <cfloop index="idx_str" list="#qAbrvs#">      <!--- Is this correct?  I think not. --->
    I think you want to be looping over your "qAbrvs" record set returned by your earlier query, maybe.
    <cfloop query="qAbrvs">
    Four:
    <cfset output_str = Replace(output_str, "#idx_str#", )  <!--- Is this correct?  I think not. --->
    Continuing on that assumption I would guess you want to replace each instance of the long string with the short string form that record set.
    <cfset output_str = Replace(output_str,qAbrs.TBLNM,qAbrs.ABRV,"ALL")>
    Five:
    </cfloop>               <!--- What am I looping on?  What is the index? How do I do the string replacement? --->
    If this is true, then you are looping over the record set of tablenames and abreviations that you want to replace in the string.

  • Batch replace color with another color

    Hi,
    I would desperately need some assistance in trying to accomplish batch editing of ai-files via JavaScript.
    What I would need to do, is go through a number (many!) of files, find items with certain swatch color (referenced by its name), and replace the item-fill with another swatch-color (also referenced by its name). Then save the document with another name.
    Other parts I have managed to do, except find/compare/modify the fill color of an item.
    I have gone through these forums and tried a number of things to a point where I am currently very confused and frustrated 
    Some details (if it helps any), I'm using Illustrator CS3 and JavaScript.
    Here's the closest where I got with trying to find a certain color and eventually changing it:
    #target illustrator
    var sourceFile, findColor, replaceColor;
    sourceFile = new File().openDlg('Please select your Illustrator file…');
    open(sourceFile);
    var docRef = app.activeDocument;
    findColor = docRef.swatches.getByName("vih");
    // replaceColor not yet used anywhere
    replaceColor = docRef.swatches.getByName("sin");
    for(var obj = docRef.pageItems.length - 1; obj >= 0; obj--) {
        if(docRef.pageItems[obj].fillColor == findColor) {
            alert("Match found"); //It never seems to get here, so my comparison clearly is not working?
        else {
            alert ("No specified color found!");
    docRef.close();
    (and yes, I'm completely new with java-scripting, so even this is constructed from bits of sample-scripts and other scripts found from these forums)
    Please, I would really appreciate any help, this can't really be such a difficult task to do... can it?
    BR,
    Johanna

    I only tried a very basic test in my case ALL path items were filled with various CMYK swatches and the swap did take place so the comparison did work. I would suspect that you have a path item that contains NO fill so any of its properties would be undefined. You can also include this in your code too. This should work for both filled and stroked path items in CMYK art.
    #target illustrator
    var docRef = app.activeDocument;
    with (docRef) {
    var findColor = swatches.getByName('vih').color;
    var replaceColor = swatches.getByName('sin').color;
    for (var i = 0; i < pathItems.length; i++) {
    if (pathItems[i].filled == true) {
    with (pathItems[i].fillColor) {
    if (cyan == findColor.cyan && magenta == findColor.magenta && yellow == findColor.yellow && black == findColor.black) {
    $.writeln('True');
    cyan = replaceColor.cyan, magenta = replaceColor.magenta, yellow = replaceColor.yellow, black = replaceColor.black;
    } else {
    $.writeln('False');
    if (pathItems[i].stroked == true) {
    with (pathItems[i].strokeColor) {
    if (cyan == findColor.cyan && magenta == findColor.magenta && yellow == findColor.yellow && black == findColor.black) {
    $.writeln('True');
    cyan = replaceColor.cyan, magenta = replaceColor.magenta, yellow = replaceColor.yellow, black = replaceColor.black;
    } else {
    $.writeln('False');
    //saveAs(filePath, saveOptions)

  • DUMP: replace all occurrences of space in string1 with string2.

    Why does this statement results in a dump:
    replace all occurrences of space in string1 with string2.
    same with
    replace all occurrences of ' ' in string1 with string2.
    string2 is a string without spaces!
    Is there any drawback on using this statements as a workaround?
    while sy-subrc eq 0.
      replace space with string2 into string1.
    endwhile.
    Thanks
    norbert

    Hi,
    See this example i got from ABAPDOCU
    replacing values
    DATA: t4(10) TYPE c VALUE 'abcdefghij',
          string4 LIKE t4,
          str41(4) TYPE c VALUE 'cdef',
          str42(4) TYPE c VALUE 'klmn',
          str43(2) TYPE c VALUE 'kl',
          str44(6) TYPE c VALUE 'klmnop',
          len4 TYPE i VALUE 2.
    string4 = t4.
    WRITE string4.
    REPLACE str41 WITH str42 INTO string4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str42 INTO string4 LENGTH len4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str43 INTO string4.
    WRITE / string4.
    string4 = t4.
    REPLACE str41 WITH str44 INTO string4.
    WRITE / string4.
    SKIP.
    ULINE.
    Example for condensing strings
    DATA: string9(25) TYPE c VALUE ' one  two   three    four',
          len9 TYPE i.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    CONDENSE string9.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    CONDENSE string9 NO-GAPS.
    len9 = strlen( string9 ).
    WRITE: string9, '!'.
    WRITE: / 'Length: ', len9.
    SKIP.
    ULINE.
    Thanks & Regards,
    Judith.

Maybe you are looking for

  • Module Development for XI3.0 Adapters

    Hello, we are currently trying to develop a xi 3.0 adapter module. Modules are a way to expand the functionalities of a xi adapter, in our cas the file adapter. Our module should be used to perform a more complex transformation from flat file to xml.

  • Rollup in cube is taking very long time (BW 3.5)

    Hi, Rollup in one of our cube is taking a long time from what it is expected. Previously this rollup was taking 2-3 hrs but now it is taking more than 8 hrs. To solve this I even tried compressing the cube till last month but of no use. (this worked

  • Weblogic server 5.1 startup error

    I am using weblogic 5.1 on Solaris 8 (intel) for testing when I start up the server, the following error prompt out java.lang.UnsatisfiedLinkError: no jsafe in java.library.path at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Thro

  • Document Splitting error - in F-90

    Hi I am posting asset transactions in F-90. Its giving error for profit center (document slitting). I have entered cost center in the asset master. Also the setting ACSET and document splitting is activated. However this error is given only for compa

  • Output AC3 for DVD is not working correctly

    My FCPX 85 minute project is in 5.1 surround. Plays nice on the timeline and I exported a master file which sounds fine. ProRes with LPCM 5.1 audio. Now I need to make a DVD standard 480p with Dolby AC3 5.1. But when I output AC3 - either directly fr