Skip navigation
Currently Being Moderated

Removing small objects in drawing

Feb 19, 2013 5:02 PM



I have a quastion regarding the removal of small objects in a drawing. I made with ArcGIS a map of the Netherlands. Because it is a detailed map, it also becomes heavy and my computer slows down. I merged some smll elements together with the pathfinder-unite command, but it is still to heavy. So I have to delete some other elements. The problem is that I want to get rid of all the small objects, but I dont know how to select them. Has Anybody an idea, to select objects by seize? It is a topograpic map with for example houses, lamp post et cetera, but I actuallly need only the build areas.

best, Roger

  • Currently Being Moderated
    Feb 19, 2013 5:21 PM   in reply to RogierHendriks003

    There is no built-in feature to select objects according to size.


    It would be fairly trivial to write a Javascript for it. I once did one to remove path segments having a length below a user-defined threshold. You would need to define "small." Area? Bounds? Length?



    Mark as:
  • Currently Being Moderated
    Feb 19, 2013 5:26 PM   in reply to RogierHendriks003

    Here's one. Copy and paste into a text editor. Save as plain text with a jsx extension in the Adobe Illustrator CSX/Presets/en_US/Scripts folder and restart AI. Have a document open. It may take some time to run.

    #target illustrator
    // deletes pathItems smaller than the supplied length
    var idoc = app.activeDocument;
    var howLong = prompt ("Enter the size in points of small paths to be deleted", 2, "Delete Small Paths");
    for (i=0 ; i< idoc.pathItems.length; i++)
              var ipath = idoc.pathItems[i]
                   if ( ipath.width < howLong && ipath.height < howLong)
                             ipath.selected = true;
    if(confirm ("Proceed to delete selected items?", "yes", "Confirm Delete"))
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points