Discussion:
Select all lines/objects > or < size
(too old to reply)
s***@adobeforums.com
16 years ago
Permalink
At work, I have illustrator 13 (a.k.a. CS3 but the whole CS concept has been developed like a bad joke) and I'm given lots of images from engineers that I have to edit for manuals. The entire image is of a machine the size of a small house, and yet the drawing contains every detail of the head of a bolt, for every bolt. No one will even see the light pixel for the bolt on their screen that is made from 30 lines. I need a way to select objects or lines that are less than a certain length so I can delete them in one key stroke. Instead, I have to click, delete, click, delete a thousand times. It can take me 2 days for this. If I'm lucky, I can click + drag an area, but that usually then involves shift clicking all the surrounding things I don't want selected after. One simple feature would save me 2 days of work.

I want a dialog box that lets me choose between selecting objects and or lines that are greater than or less than or equal to a length, and I can pick between points, picas, inches, feet, millimeters, centimeters, meters, or pixels.

And even more cool, would be if a plug in was made of this for AI 13 instead of making me buy another version. Despite the 2 days of work it'll save me, convincing a corporation to spend hundreds of dollars for 1 feature will be a tough sell.
Larry G. Schneider
16 years ago
Permalink
If you are working on a Mac, here's a script that someone wrote to do just that

------------
property schnibbleSize : 2 --size in points

tell application "Adobe Illustrator"
if current document is {} then return
tell current document
set g to every path item whose editable is true and width < schnibbleSize and height < schnibbleSize set selection to g delete selection



end tell
end tell

-------------

Cut and paste the above into the Apple Script Editor and save in the Scripts folder of the AI Presets folder.
J***@adobeforums.com
16 years ago
Permalink
Something similar in Javascript (therefore cross-platform):

var docRef=activeDocument;
var minLength=prompt("Deselect Paths shorter than:",5);
for(i=docRef.selection.length-1;i>=0;i--){
var currItem=docRef.selection[i];
//alert(currPath.length>minLength);
if(currItem.typename!="PathItem"||currItem.length>minLength){

currItem.selected=false;
redraw();
}
}

The script assumes you already have a selection. It then DEselects whatever selected items are not PathItems or have a path length of greater than the minimum specified by the user (in points).

This is a first-off rough. It can be easily altered or elaborated.

JET
s***@adobeforums.com
16 years ago
Permalink
Darn. I'm on a PC

Thanks, though

Loading...