1 Reply Latest reply on Aug 10, 2013 4:50 AM by Muppet Mark

    select objects outside artboard

    surendarappu Level 1


      i want to select the objects outside artboard using javascript

      any one help me with javascript,

      their are many objects outside activeartboard i want to select all those object using script



      Thank you


        • 1. Re: select objects outside artboard
          Muppet Mark Level 5

          Well as you appear to be happy with the selection of objects on the Artboard… You could now just remove() or other by testing the selected property…

          #target illustrator
          function removeNonArtboardFluff(){
                    var i, doc, count, itemList;
                    doc = app.activeDocument;
                    doc.artboards.setActiveArtboardIndex( 0 );
                    itemList = doc.pageItems;
                    count = itemList.length;
                    for ( i = count-1; i >= 0; i-- ) { // A reversed loop for object removal…
                              if ( ! itemList[i].selected ) { itemList[i].remove(); }
                    doc.selection = null;