Remove Unused swatchs, brushes,symbols

Hi all,
I want to be remove unused swatches, brushes, and symbols in my Illustrator document by using of javascript. Any one give a scripting for the above solution.
Is there any properties are changed in CS3 to compare with the Illustrator CS2 javascript.
Any Ideas for my Question. Kindly reply to me.
Thanks,
Nagaraj
[email protected]

You may have better luck on the scripting forum.

Similar Messages

  • Deleting unused swatches change the gradient

    Hi All,
    I have tried this Javascript to remove unused swatches in a document (Indesign CS4). It did remove all the unused swatches but it changed the used gradient color into black color and still has the gradient property but couldn't change any color values for that particular gradient after running the script.
    #target indesign
    var myIndesignDoc = app.activeDocument;
    var myUnusedSwatches = myIndesignDoc.unusedSwatches;
    for (var j=myIndesignDoc.unusedSwatches.length; j > 0; j--)
      myIndesignDoc.unusedSwatches[j-1].remove();
    Please advise me where I did wrong and also please suggest the right solution for this.

    Hi Friends
    Use this script it will help ful.
    # target "Deleting unused swatches change the gradient"
    var myIndesignDoc = app.activeDocument;
    var myUnusedSwatches = myIndesignDoc.unusedSwatches;
    for (var s = myUnusedSwatches.length-1; s >= 0; s--) {
         var mySwatch = myIndesignDoc.unusedSwatches[s];
         var name = mySwatch.name;
    // alert (name);
      if (name != ""){
    mySwatch.remove();

  • Action to remove all unused swatches nearly works...

    I've been using the default Action to remove fluff (unused swatches, symbols, brushes, etc.) but it has a funny quirk. I have a spot black color (named black) that always escapes the purge, even if it not used in the document. It is not set as the default stroke/fill, and there are no styles that use this swatch. Even if I run the Action twice the swatch remains. Even if I rename the swatch to something other than black it remains. Even if I rename the swatch and give it a different CMYK mix it remains. As a kludge, I've been using a combo of the default action and John Wundes' Delete Fluff script to get everything, but it is not an ideal solution. Wundes' script, which is unable to delete used brushes, roots out the offending swatch. It is unable to delete unused brushes, so following up with the default action clears those out. Also, Wundes' script is very slow and will often beach-ball the application, requiring a force-quit occasionally.
    Two questions:
    ============
    Can anyone think of other places that might harbor this rogue spot color and make the default action not find/delete it?
    Is there a simple script that could check specifically for the use of this color in the document and delete it?
    Cheers and thanks!!
    -G-

    The reason I feel like it is a remnant of a deleted brush is because:
    -- I can run the Action the first time and the unwanted swatch is still there.
    -- I can run the Action again (or ten times), and it is still there.
    -- If, however, I save, close, and then open the document, and run the Action again then it will result in getting rid of the unwanted swatch.
    I don't know what magic exists in John's script, but it has no problem getting rid of the unused swatch right off the bat...
    -g-

  • Check-In of Brush, Symbol, Swatch Libraries from AI not working as expected

    I am developing a custom connector for Adobe Drive. A large number of our users are Adobe Illustrator users.  From within AI, the user can save a Brush, Symbol, or Swatch library as a file to one of our Adobe Drive shared folders.  When this happens, the user sees the standard Check-In dialog prompting for the version comment.  After entering the comment and pressing "OK", the file is saved locally to the Adobe Drive folder, but my connector's CheckInHandler.execute() method is never getting called.  In other words, the user expectation is that the Swatch, Symbol, etc. library file has been checked into our system, but it never is.  To actually check in the file I have to open the Adobe Drive folder in Windows Explorer and check-in the file from the right-click menu.  This problem behavior only exists for the Library files.  I can save/check-in new and updated versions of the main AI file into our Adobe Drive folders as expected (e.g., using the File -> Check In menu command).
    So my questions are:
    1) Is this behavior reproducible by others and/or is it a known issue?  It's been reproduced consistently in-house.
    2) What is the intended behavior for saving Brush/Symbol/Swatch library files to Adobe Drive folders from within Adobe Illustrator?  It seems like it should either not prompt for a Version Comment, forcing the user to check-in from Explorer/Finder, or (ideally) would prompt for a comment and complete the check-in process like it does for the main AI file.  To show the Version Comment dialog but not actually have the file get checked in is confusing to the user.
    3) Any suggestions for solving or working around the issue?
    Thanks in advance,
    Brian

    As a follow-up, I tested this scenario with the SDK's sample FTP connector and saw the same behavior: upon saving the Library file to the Adobe Drive folder from within AI, I am prompted for a Version Comment but the file is never checked in to the repository (i.e., the FTP server). 

  • Is there a button to remove all unused swatches in a file?

    Hey all, 
    Just wondering is there a button that removes all unused swatches in an illustrator file?
    Any help would be great

    Look in the Actions panel. There should be an action there which says Delete All Unused Panel Items.

  • Deleting Unused Swatches

    Because I'm unable to invoke the "Select All Unused" menu item of the Swatches panel menu I'm trying to attack it programmatically.
    What I'm trying to determine is if it's sufficient to compare the Fill and Stroke Color of each Path Item (every path item of current document) or are there other items that should be examined to achieve the same results as the command in the Swatches panel menu? Page Items doesn't appear to contain a Fill Color property. I've got AppleScript code that appears to do the trick, but I'd like to get input so as to make sure I'm not missing something that my testing might not have uncovered.
    Thanks!
    Stephan

    Another method might be to remove the extra swatches from the startup files (or New Document Profiles as they are now known) So there are fewer unused swatches to deal with. Relatively few people take the time to modify the action sets aside from adding new ones. Here's how the Delete Unused Panel Items looks in the Default _Actions.aia file
    /action-10 {
        /name (Delete Unused Panel Items)
        /keyIndex 0
        /colorIndex 0
        /isOpen 0
        /eventCount 8
        /event-1 {
            /internalName (ai_plugin_symbol_palette)
            /localizedName (Symbols)
            /isOpen 0
            /isOn 1
            /hasDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette -1
                /type (enumerated)
                /name (Select All Unused)
                /value 12
        /event-2 {
            /internalName (ai_plugin_symbol_palette)
            /localizedName (Symbols)
            /isOpen 0
            /isOn 1
            /hasDialog 1
            /showDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette -1
                /type (enumerated)
                /name (Delete Symbol)
                /value 5
        /event-3 {
            /internalName (ai_plugin_styles)
            /localizedName (Graphic Styles)
            /isOpen 0
            /isOn 1
            /hasDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette 1
                /type (enumerated)
                /name (Select All Unused)
                /value 14
        /event-4 {
            /internalName (ai_plugin_styles)
            /localizedName (Graphic Styles)
            /isOpen 0
            /isOn 1
            /hasDialog 1
            /showDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette 1
                /type (enumerated)
                /name (Delete Style)
                /value 3
        /event-5 {
            /internalName (ai_plugin_brush)
            /localizedName (Brush)
            /isOpen 0
            /isOn 1
            /hasDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette 1
                /type (enumerated)
                /name (Select All Unused)
                /value 8
        /event-6 {
            /internalName (ai_plugin_brush)
            /localizedName (Brush)
            /isOpen 0
            /isOn 1
            /hasDialog 1
            /showDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette 1
                /type (enumerated)
                /name (Delete Brush)
                /value 3
        /event-7 {
            /internalName (ai_plugin_swatches)
            /localizedName (Swatches)
            /isOpen 0
            /isOn 1
            /hasDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette 1
                /type (enumerated)
                /name (Select All Unused)
                /value 11
        /event-8 {
            /internalName (ai_plugin_swatches)
            /localizedName (Swatches)
            /isOpen 0
            /isOn 1
            /hasDialog 1
            /showDialog 0
            /parameterCount 1
            /parameter-1 {
                /key 1835363957
                /showInPalette 1
                /type (enumerated)
                /name (Delete Swatch)
                /value 3

  • Need help deleting unused swatches in CS4

    I upgraded from CS3 to CS4, and simultaneously switched platforms from windows to mac osx. Now I can't find the option for deleting all unused swatches in the swatch palette menu and I'm starting to feel insane because I've run several searches and no information about this is popping up anywhere. Can anyone help?

    That's one way, I guess. But in CS3 I was able to select all unused swatches and then drag them to the trash. That way I could still have my default swatches for new projects. But I guess this feature was removed for CS4?

  • Deleting unused swatches except for...

    I have a script that cleans up my document... one of the functions is that it deletes unapplied swatches. This works well for me most of the time but in instances where I'm using a color whose name begins with a "D", I want the script to ignore it.
    In my workflow, "D" represents a digital process and we don't apply a color swatch to digitally printed artwork but a "D" swatch is necessary for our output program to sort the job to the correct printer. The swatch names vary but always begin with a "D" (DBLK, DGLD, DGRN....).
    Thoughts, suggestions?
    Thank you very much for your help.
    //delete unused swatches
    var myIndesignDoc = app.activeDocument;
    var myUnusedSwatches = myIndesignDoc.unusedSwatches;
    for (var s = myUnusedSwatches.length-1; s >= 0; s--) {
         var mySwatch = myIndesignDoc.unusedSwatches[s];
         var name = mySwatch.name;
    // alert (name);
      if (name != ""){
    mySwatch.remove();
    (I found this little script somewhere in these forums - I apologize for not having the credit information available)

    Hi,
    replace the line:
    if (name != ""){
    with:
    if (name != "" && name.search(/^D/) == -1){
    ...(/^D/i) if not case sensitive...
    Jarek

  • Need Script to remove unused elements...

    anyone know of a script to remove:
    all unused paragraph styles
    all unused character styles
    all unused swatches
    all unused table styles
    all unused cell styles
    all unused object styles
    all unused master pages
    Please let me know

    Can you not tag along a running discussion with a totally different subject?
    Please keep the forum tidy and use the Start a discussion link to start a new discussion. It also helps to enter a descriptive title; "please help me" is not one.

  • • INDD crash when select "all unused swatches"

    Hello -
    I think all is in the topic title…
    My InDesign® CS5 (7.0.4) crash when I select "all unused swatches" (from swatches palette).
    This happens in opened document, but also in a new empty document.
    • I delete (an rebuild) the préférences of the software.
    • I repaired the authorizations of the Mac
    Does someone know why?
    Thank you, have a nice day…
    - Dimitri
    [link removed by moderator]

    Hello Peter -
    Thank you for your answer.
    But I didn't trash manually the prefs. files.
    I did it via the keyboard keys combination (when InDesign® is launched).
    So is there another trick?
    Thank you, have a nice day…
    - Dimitri

  • Delete unused swatches in InDesign CS5, js

    Hi,
    I need to select and delete unused swatches in InDesign CS5. I looked through OMV in "Swatches" and "Swatch", but I could not find any function to select unused swatch and delete it.
    Am I looking for it in the wrong place?
    And I also need to read color values for used swatches. I got this in OMV and was hoping it would give me an array of the color values for all existing swatches, but I am only getting "Object color":
    mySwatches = myDoc.swatches[1].getElements();
    alert (mySwatches)
    Thank you for your help.
    Yulia

    Hi Yuliaart,
    Try this script it will help ful.
    # target "Deleting unused swatches change the gradient"
    var myIndesignDoc = app.activeDocument;
    var myUnusedSwatches = myIndesignDoc.unusedSwatches;
    for (var s = myUnusedSwatches.length-1; s >= 0; s--) {
         var mySwatch = myIndesignDoc.unusedSwatches[s];
         var name = mySwatch.name;
    // alert (name);
      if (name != ""){
    mySwatch.remove();

  • Acrobat 9.0 freezes while "Removing unused objects"

    I am using Acrobat Pro 9.0 in a Windows 8.1 environment.  When I attempt to convert a PDF I created to a Form the program freezes once I click SAVE and "Removing unused objects" appears.  I have "repaired" and "reinstalled" the application but the problem persists.

    Hi Mike,
    I do have some startup items;
    EyeTV Helper
    AdobeResourcesSynchroni
    I Love Stars
    GrowlHelperApp
    NikePlusUtil
    EEvent Manager
    EPSON Scanner Monitor
    I don't have any haxies on anything.
    I made a new user account and tried to replicate the problem but it seems to work fine when logged in as a different user which leads me to think it is a preference in my current user>library
    Ross

  • Acrobat 6 - Save As - Removing Unused Objects

    When using the "Save As" feature to save from a mapped network drive to the personal drive, documents that are created from a scanned image take a long time to save, and on the progress bar show the message "Removing Unused Objects".  My client is using Acrobat Standard 6, and I am unable to find any type of "PDF Optimizer" as the later versions have.  Is there any way to remove this background processing that Adobe is doing and speed up the network saving?
    Thanks,
    edgetech1

    Is there anyone out there who can offer some insight into this?

  • Lightroom 4 - Spot removal and adjustment brush issues

    In Lightroom 4, my spot removal and adjustment brush tools will not work on all areas of photos (in particular faces and the center of photos). The cursor seems to show the tool only on the outside portions of the photo.  Any suggestions?

    I have seen this a couple time and a restart of Lr has always fixed it.  It seems like there is some kine of dialog box waiting for input "hidden" behind Lr as it its not there if you minimize Lr.  This has been reported many times for a LONG time so it is probably one of the Lr bugs that is not getting fixed.  To be fair to Adobe, if someone could reproduce this problem it might get fixed but it seems to be pretty obscure.  BTW, I think Ihave seen reports of it in Lr5 also so hopefully it will get fixed in Lr 6

  • Trim Whitespace.vi - remove unused polymorphic VI instances

    Hello All
    From some time while building the exe file I have started to receive the error:
    Error 1073 occurred at E:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\Utility\error.llb\Trim Whitespace.vi
    Possible reason(s):
    Application Builder: Unable to disconnect type definitions and remove unused polymorphic VI instances for this application. Deselect this option on the Application Settings tab and build the application again.
    It did not happen before. Of course I can leave all polymorphic vis in my application, but why I started to get this error? It never happened before. Especially that the Trim Whitespace.vi is not a polymirfic vi.
    Any ideas?
    thanks in advance.
    Pawel

    Hi Mohadjer
    Demn.... I remember now. I started to get this error when I saved my vi (for other purposes) with removed diagrams. Probably it removed it also from the vi.lib vis. Wow.... Now I am having problems, how many vis I have destroyed when this happened.
    Anyways, thanks a lot for this. At least I know what I have done .
    regards
    Pawel

Maybe you are looking for

  • New Launchpad app in new tab or window of browser

    Hi , How can we launch a new launchpad app ( like sales order app) in new tab or window of browser. with the new launchpad apps they are opened in same window and user want to work with multiple apps opened in different tabs. Any idea how to achieve

  • G5 2ghz Dual - Hanging with LED #7!!!

    Hi folks, my 8 month old G5 has just started hanging (freezing completely!) with the #7 LED lit. There are no Kernel Panic screens shown - it just stops working. At the moment its run time is limited to about 60mins. Its not a software issue as all t

  • I can't open delete or send e-mails from hotmail with firefox 11

    my problem starts 3 days before i performe the update to FF11 so i can't open edit send or delete any e-mail from hotmail and still continues after the update to version 11 of FF. That issue happens only with FF on IE they work perfect. Any idea how

  • WAD stops responding to SAVE options

    Hi there I am new to using WAD in 2004s, and have noticed that after a while working on a template (say 90 minutes), the SAVE option(s) stop responding. I can make changes to the template, press the SAVE button, wait for the cursor to change to show

  • Can i use this to record games with windows 7

    hey guys i want to know if i can use a Pinnacle Systems - Dazzle Digital Video Creator Plus with windows 7 64 bit i want to record ps3 games Solved! Go to Solution.