With the freeware utility MinOf you can select the smallest or largest object from the selection set, by a specified property (e.g. Area, Length, Volume, Elevation, Scale…).
Download the MinOf utility from Download, load it into your AutoCAD with APPLOAD and start it by typing the MINOF command.
The first prompt asks for the drawing object type, this will also influence the next property set:
Specify type of compared objects [Any/Line/Polyline/anYline/clOsedpoly/Circle/Text/Insert/Hatch/Solid].
"Any" will accept any type of object, "anyLine" allows Lines, Polylines and Splines, "clOsedpoly" allow only closed LWpolylines, "Solid" means 3D Solids.
Then you will select the source objects for the comparison.
The next prompt lists all common numeric properties for the selected object types (analyzes the first of them). You can also type any other property if you are familiar with the DWG objects. The "Centroid" property means "Z-coordinate of the centroid", the "strlEngth" pseudo-property is a computed string length (number of characters), the customizable "cUstomprop" is described below.
The last prompt asks for choosing the Minimum (smallest) or Maximum (largest) object - compared by the selected property. The resulting object will be selected - e.g. the shortest line.
You can use MinOf either separately (grip-selects the specified object), or inside any other command invoking it on the "Select objects:" prompt by typing the transparent command 'MINOF or the LISP command (C:MINOF). See:
The special property "cUstomProp" can be used to process and compare any other object property. You will first need to define a custom function which will handle this parameter. This LISP function must be called "MinOfCustomProperty", has a single parameter, object ID and should return a number - the value of the custom-defined property. See examples:
Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above).
You may also add a link to your web - like this "fan" link:
Featuring: Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools
Please use these tips at your own risk. Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.