Remove unused Styles using measures

Hello

I need to remove paragraph styles not used in the document by using action, until the unused style count is 0.

I saw the url below in this forum.  I can do this, use the action?

remove unused styles from a single action...

Thanks in advance,

Sudha K

Hello

It won't make any change. However, please create pdf and compare with an old to check this. If my answer is correct, please mark it as correct response so that it is reference to others.

Thank you

Ramesh K

Tags: InDesign

Similar Questions

  • remove unused styles from a single action...

    Hello world

    Is there a faster and better way to remove unused paragraph styles and character in InDesign without closure styles. Here is my script created. Its working fine.

    //-----------------------------

    var doc = app.activeDocument;
    var pStyle = doc.paragraphStyles;

    for (i = pStyle.length - 1; i > = 2; i--) {}
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.appliedParagraphStyle = pStyle [i];
    var myFind = app.findText (false);
    If (myFind == 0) {}
    pStyle [i] .remove ();
    }
    }
    Alert ("OK");

    //----------------------------

    But in our documents, we have many styles. So above script takes a few minutes to perform the task. It would be better if she has the action runs in a few seconds. Can someone look into this and provide me with a better solution.

    Thanks in advance

    Indana

    Here is how I could do this:

         ArrayCompress=function(array){
              var str = array.sort().join('\r')+'\r'
              str = str.replace(/([^\r]+\r)(\1)+/g,'$1')
              str = str.replace(/\r$/,'')
              return str.split('\r')
         }
         IsInArray = function (item,array){
             for(var i=0;i=0;i--){
         if(IsInArray(allStyles[i].name,names)){
              allStyles.splice(i,1);
         }
    }
    alert(allStyles.length + " unused styles");
    

    Please note: If your tables are tidy header or footer, cells.everyitem () will not work. You will need to loop through the cells to build the table.

    Substances

  • Remove unused styles

    Hi all

    Is it possible to look through a site and find all the CSS rules that are used and then delete unused rules to a set of style sheets?

    Thanks for any idea.

    In a Word, no. This would be a useful feature, but there is nothing of that nature built into Dreamweaver. Personally, I use the Audit to the Chrome Developer Tools tab to to deal with this.

  • Failed to remove unused Styles

    The inDesign CS5.5. I can't select all the styles, but the option to remove and trash can icom dimmed out and not selectable. What Miss me?

    I bet that you have the "Basic Paragraph Style" selected - and this isn't trashable. Deselect by clicking the control, and then try again.

  • Remove unused paragraph Styles - without basedOn styles

    Hi all

    I have remove the unused paragraph style, re-flow the pattern content also deleted "basedOn" style.

    How to avoid remove basedOn styles.

    Example here:

    1. I have not used the '06 extract"style of paragraph directly in paragraphs (texts), so it's the unused paragraph style.

    2. I applied "06 extract 1 P" style of paragraph directly in paragraphs (texts), but connected the pstyle "06 extract" to indirectly ' 06 1 P "(avec l'option basedOn) see below excerpt.". "

    Removing unused styles, the "06" excerpt has also removed and affects '06 extract 1 P. So, re-flow occurring in this document, how to avoid this? No need to remove by using the 'basedOn' styles (example: "06 extract").

    Screen shot 2015-10-12 at 3.27.12 PM.png

    myDoc var = app.activeDocument;

    var myParStyles = myDoc.paragraphStyles;

    var myCharStyles = myDoc.characterStyles;

    for (I = myParStyles.length - 1; i > = 2; i--) {}

    removeUnusedParaStyle (myParStyles [i])

    }

    for (I = myCharStyles.length - 1; i > = 2; i--) {}

    removeUnusedCharStyle (myCharStyles [i])

    }

    function removeUnusedParaStyle (myPaStyle) {}

    app.findTextPreferences = NothingEnum.nothing;

    app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences.appliedParagraphStyle = myPaStyle;

    var myFoundStyles = myDoc.findText ();

    If (myFoundStyles == 0) {}

    myPaStyle.remove ();

    }

    app.findTextPreferences = NothingEnum.nothing;

    app.changeTextPreferences = NothingEnum.nothing;

    }

    function removeUnusedCharStyle (myChStyle) {}

    app.findTextPreferences = NothingEnum.nothing;

    app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences.appliedCharacterStyle = myChStyle;

    var myFoundStyles = myDoc.findText ();

    If (myFoundStyles == 0) {}

    myChStyle.remove ();

    }

    app.findTextPreferences = NothingEnum.nothing;

    app.changeTextPreferences = NothingEnum.nothing;

    }

    Thank you in advance,

    Dev

    before checking if the paragraph style is in use, check if all other models are based on it. something on the lines of (warning code, bad, inefficient to come):

    for (i = myParStyles.length - 1; i >= 2; i--) {
        for (var z = 0; z < myDoc.allParagraphStyles.length; z++) {
            var goodToRemove = true;
            if (myDoc.allParagraphStyles[z].basedOn == myParaStyles[i]) {
                //mark the parastyle as not to remove
                goodToRemove = false;
                break;
            }
        }
        if (goodToRemove) {
            removeUnusedParaStyle(myParStyles[i]);
        }
    }
    
  • Using the crop tool to remove unused pixels or the artboard

    I have a cut picture, I placed a drop shadow (using the layer styles) on a transparent background.  I want to quickly use the crop tool to remove unused pixels or the artboard.

    I tried to enable 'show the edges of the layer', but it ignores the layer style/shade that I placed, and as it disappears when you start using the crop tool itself.  If this does not really work.

    Is there another way to do this?  Other than the eye it?  I too want to crop the image as tight as possible, but I don't want tight, too tight and cut off from the shadow.  Any advice?  Thank you!!

    Try Image - Trim function.  I think it will do exactly what need you.

    -Christmas

  • FrameMaker 10: Manage styles used and new

    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/framemaker/pdf/FRAM EMAKER11_UPGRADE_GUIDE. PDF said 10 FM offers the possibility of 'Manage styles used and new: paragraph, character, table "but I'm unable to find this information in the help system (extremely useless). Can someone point me to a discussion of this featue? We are moving towards new models and would like to make the transition as painless as possible.

    http://help.Adobe.com/en_US/FrameMaker/10.0/using/WSb279e4ac6862353b-3f9e7ca912bf358843f-8 000. HTML

    The support is pretty basic. In the respective catalog views, click Options... to get the window that allows to remove unused formats. The check marks in the catalogue lists show formats that have been applied in the document.

  • How to remove the pagefile used?

    I had used for VM's C: drive once and create a ghost for the backup of the OS image.

    After that, I had spent D; drive for VM, but not updated the ghost for the backup of the OS image.

    After I restored my OS image and find that C: drive is used for the virtual machine instead of D: drive, but the swap file is stored on the D: drive, and

    I would like to know how to remove unused pagefile on the D: drive.

    Does anyone have any suggestions?

    Thanks in advance for your suggestions

    D: as a separate hard drive, place a swap a file

    partition, is not advisable... Either way, R.click my computer, properties,

    Advanced, virtual memory, change button, L.click on the hard drive, the value

    "no page file" click 2 X game, close...

  • Cannot upload anything get message that the disc is full... Remove unused files and try again

    I can't download anything. I get a message that the disc is full... Remove unused files and try again... I have deleted many, cleaned the register w/Ccleaner, but doesn't seem to be enough... I don't have the original Windows XP CD... Was already installed. I don't have a recovery CD. Can I use this and start all over again to start on a clean slate? Is there something I can do? I can't yet to update anything.

    I have w/Service pack 3 Windows XP. PC is Dell pentium 4.

    I can't download anything. I get a message that the disc is full... Remove unused files and try again... I have deleted many, cleaned the register w/Ccleaner, but doesn't seem to be enough... I don't have the original Windows XP CD... Was already installed. I don't have a recovery CD. Can I use this and start all over again to start on a clean slate? Is there something I can do? I can't yet to update anything.

    I have w/Service pack 3 Windows XP. PC is Dell pentium 4.

    Please do these two simple things and the report on the results.

    A. report of the disc

    1 double click (or click, if it's in the start menu) Workstation

    2. for each drive (you must be at least 'disc' Local (c), right click and select Properties.  Report of the 'space used', 'Free space' and 'capacities '.

    B. know what is using the space

    1. get a USB that has at least 4 MB of space.  You can buy a 4 GB (this is 1,000 times more that you) thumb drive from Staples for $7.99 and connect it to your computer.

    2. download JDiskReport.  Go to http://www.jgoodies.com/downloads/index.html, make a right click on the link 'Win', choose ' save link under ', navigate to your USB key and save the file.

    3. in the installation: uncheck the 3 boxes on the screen "select components"; on the "Choose installation location" screen, click the Browse button and navigate to your USB key so that all the files will be installed on the USB.

    4. when the installation is complete, click on my computer, open the USB key, open the folder named JDiskReport and double-click on the file named jdiskreport - 1.3.2.jar (you don't see the .jar extension).

    5 scan C: and see what is taking place.

  • How to remove unused files from my account site live hotmail?

    original title: unused files

    How to remove unused files from my account site live hotmail?

    The question you have posted is bound using Windows Live (hotmail) and would be better suited to the Windows Live Help Solution . Please visit this link to find a community that will provide the support you want.

  • remove unused pages after copyng to previous pages

    original title: remove unused pages after coptyng to previous pages

    Hi, I have vopy oand CPAST info frompages to prreevios of pages but can not remove unused pages. Can you help me?

    Thank you

    Vicki

    Hello

    A few questions will help us better to solve your problem. Please answer these questions for us:

    1. what operating system do you use?

    2. what programs you have problems with?

    3. is there an error message generated?

    4. what type of file you go when this happens?

    5 How long this issue is past?

    6. is there anything changed/added/deleted before this issue popped up?

    It's basically the who, what, when, where and why of troubleshooting.
    b Eddie

  • Removing unused columns - pre and post checks

    Friends...

    DB: 11.2.0.3

    OS: Linux

    I have a few quick questions in relation to removing unused columns which I intend to do on the production database (5 tables 20 GB each)

    The columns are already defined as unused tables, but I'm trying to get a backup plan for this tables if something goes wrong, while editing the table.

    Could some experts share their experience with me?

    1. What backup plan, I can have 5 tables to retrieve them in case something goes wrong?

    (I thought about import export, but I think import will fail if I try to import after that "alter table drop unused column" did not order)

    Also some tables have 500 lines and taking the export compliance will be problematic.

    2. any request to know in advance which package could be invalid after the fall of the column?

    3. statistical does is invalid?

    (According to my knowledge, I think that it won't affect his stats and also tested this and stale_stats column was not after a column.)

    4. do I need to scan the table or rebuild indexes to ensure that this drop column does not affect the performance of the application?

    5. any other minor/major that keep them in check after a fall unused column?

    Thank you

    Mike

    @rp0428... I understand your doubts and yes it's true, there were 5 tables of 20 GB each and additionally 5 tables, there are a few smaller tables I thought won't create a problem. For large tables, I did used control point.

    As always, I have tested plan in dev environment with the same size/data lines but a unused fall was quick and no problem with cancellations is why during production, it took me surprise.

    I had cancellation of 32 GB, so obviously, I was confident of small tables)<5 gb)="" should="" definitely="" fit="" in="" 32gb="" (but="" it="" wasn't="" the="">

    OK - but we can only go through the information you post and you don't post anything of this.

    If you had my question would be why you do not use "checkpoint" when you tested and why you didn't used it for this 5 GB table in production that generated 100 GB of REMAKING?

    My next question would be: what PROBLEM have you tried to solve by dropping the unused columns? Your application was working fine so why was the decision taken?

    And the reason for this question is that ANY significant changes to a table (standard partitions, add virtual columns, split partition, etc.) is ONLY suitable for technical purposes.

    There are almost always other changes that could / should be made and it is usually beneficial to make all these changes as a whole. Common examples include 1) get rid of the old data (dilation), 2) addition of such constraints as NOT NULL, 3) a table partitioning, 4) adding new columns - perhaps with NOT NULL value and/or default values constraints.

    Since 'other' someof these changes can be problematic if done online, it is generally advised to do a thorough analysis to make sure that you have identified ALL the changes you want, you can then do all at once. Often the best solution is to re-create the table and data using the DEC.

    1. a normal 'drop unused' rewrites all the blocks. It's not moving lines to other blocks - it essentially tightens just online content in order to remove all the content of the unused column.

    2. a normal 'drop unused', even if you use control points, leaving the "unusable" table until the WHOLE picture was treated. This means you NEED to perform the operation before normal re-use of this table, you can resume

    3. a normal life 'unused drop' will NOT free space which can be used by other objects - the same lines occupy the same blocks - the lines are just "small". Therefore, there is NO space to release.

    Creating a table (e.g. DEC) you can use a bulk loading and parallel operations and move lines of new blocks. It can also if take care of these 'other' I mentioned with little or no extra charge of the changes.

  • remove unused resources, while being sensitive to the related assets

    How can I remove unused assets from my library?

    Of course, the easy answer is to verify the account of its use and remove anything from scratch.

    But, how can ensure me that I don't remove an asset that has a counter for the use of zero, BUT is loaded by Actionscript?

    Is the library > select unused items sensitive to this?

    Thanks for your comments.

    Hi Greg,.

    In Flash Pro when you right-click in the library and choose "Select unused items" symbols with link names get selected. Thus the cases you mentioned above is supported.

  • IDCS6 MACOSX JS: script of 'remove unused layer' is not from masters of the masters

    Hello everyone.

    I have an old script I've used several times to remove the unused layers. Until today, I thought that worked well:

    var layers = app.documents[0].layers.everyItem().getElements();
    for(var i=layers.length-1;i>=0;i--){
      if(layers[i].pageItems.length==0){
        layers[i].remove();
      }
    }
    

    However, today, I used the script on a document that was a never used layer once on a master page to which other master pages have taken place on the basis. To my surprise, when the script is run, this specific layer has been removed.

    my knowledge of the script is poor, but looking at the script, it seems that the script is looking at all the layers that have something in them and any layer comprising any element should be removed. However, I think that only made pageItems refers to the regular pages or template, not masters BASED ON other masters.

    I think that the problem is similar to another that I had recently where I had a script that has removed the unused masters, but deleted that other masters masters took place on the basis, and I think that the principles are the same. This thread can be found at:

    http://forums.Adobe.com/message/5922004#5922004

    In short, the script that worked there were as follows:

    xUnusedMasters(myDoc);
    
    function xUnusedMasters( docRef ) {
    var mpNames = new Object () ;
    var allPages = docRef.pages ;
    for ( var pIndex = allPages.length - 1 ; pIndex >= 0 ; pIndex-- ) {
    mpNames = addMasterName ( mpNames , allPages[pIndex] ) ;
    }
    
    var allMasterPages = docRef.masterSpreads ;
    for ( var mpIndex = allMasterPages.length - 1 ; mpIndex >= 0 ; mpIndex-- ) {
    if ( ! mpNames[allMasterPages[mpIndex].name] ) {
    allMasterPages[mpIndex].remove() ;
    }
    }
    return ; 
    
    function addMasterName ( MPDB , pageRef ) {
    if ( pageRef == null ) { return MPDB ; }
    if ( pageRef.constructor.name == 'MasterSpread' ) {
    MPDB[pageRef.name] = true ;
    }
    return addMasterName ( MPDB , pageRef.appliedMaster ) ;
    }
    }
    

    is it possible to modify the script above so that instead of remove unused pages of masters, it takes away the layers used in a similar way?

    Thank you very much

    Colly

    Hello

    Maybe a little differently...:

    Array.prototype.filter = function(collection) {
              var k, i, con, ids = collection.everyItem().id;
              con: for (k = ids.length - 1; k >=0; k--)
                        for (i = 0; i < this.length; i++)
                        if (this[i].id == ids[k]) {
                             ids.splice(k, 1);
                             continue con;
                             }
              return ids;     // array with unmatched ids from collection
              }
    
    var
              mL = app.activeDocument.pageItems.everyItem().itemLayer,
              mUnusedLayersID = mL.filter(app.activeDocument.layers),
              len = mUnusedLayersID.length;
    
    while (len-->0)
              app.activeDocument.layers.itemByID(mUnusedLayersID[len]).remove();
    

    mL is a table with a layer of each pageItem;

    filter compared to the collections of doc.layers;

    unmatched ways not so used are deleted.

    Jarek

  • Remove unused shades except for...

    I have a script that cleans my document... one of the features is that it removes the unused nuances. This works well for me most of the time, but in case 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 do not apply a color swatch to the digitally printed illustrations, but a "D" grade is required for our program output to sort the job to the correct printer. Swatch names vary but always begin with a "D" (USB, DGLD, NOTARY...).

    Thoughts, suggestions?

    Thank you very much for your help.

    remove unused shades

    var myIndesignDoc = app.activeDocument;

    var myUnusedSwatches = myIndesignDoc.unusedSwatches;

    for (var s = myUnusedSwatches.length - 1; s > = 0; a--) {}

    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 available credit information)

    Hello

    Replace the line:

    if (name != ""){
    

    with:

    if (name != "" && name.search(/^D/) == -1){
    

    ... (/ ^ D / i) if not broken...

    Jarek

Maybe you are looking for