CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT | CAD ESHOP - CZ | SK | EN | DE
Over 1.077.000 registered users (EN+CZ). New 1D nesting and 3D nesting tools, updated Color converter. New AutoCAD 2025 commands and variables. Learn about twiGIS.
Place your Ad on CADforum.cz

CAD tip CAD tip # 6365:

Question

CAD 
 %  platform  category 
A
The function "Select similar" (the command SELECTSIMILAR, resp. AecSelectSimilar - see the menu Edit and the object context menu) is in older versions (pre-2011) available only in the AEC versions of AutoCAD (AutoCAD Architecture, AutoCAD MEP, AutoCAD Civil 3D).

Using a simple LISP expression you can add this functionality also to a plain AutoCAD. Add the following expression (command) to a toolbar button or context menu:
(cadr(sssetfirst nil (ssget"_X"(list(cons 0(cdr(assoc 0(entget(car(entsel"\nSelect object and all similar: "))))))))))

This function can be then used either in the normal command mode - after you select an object, all entities of the same type are grip-selected; or you can use it on the standard "Select objects" prompt - there it includes the selected object and all similar objects in a standard selection set of an editing command.

Another option is to use the expression:
(ssget(list(cons 0(cdr(assoc 0(entget(car(entsel"\nSelect object and all similar: "))))))))

This function also prompts for a sample object. Then it asks for a standard objects selection. From these objects, only those objects will be used which are similar (the same type) to the sample object.

ACADADTCivilABS
100% *CAD
29.10.2008    39661×  

See also:
Tip 14271:How to use the STRETCH command to resize an object to a specific size?
Tip 14250:How to select all lines of the same length or boundary polylines of the same area?
Tip 14232:How to find out the fillet radius of a 3D solid?
Tip 14226:Cannot select multiple objects with Shift, ribbon tab "Multiple" is displayed.
Tip 14192:MLfillet - how to fillet multilines in AutoCAD?


Back   All CAD Tips



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: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info


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.
TOPlist