[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Select Objects with the Filter Tool
Tip# 3696 By Hayden Clarke On 31-Jul-2011
4
Rated By 1 users
Categories : Object Properties
Software type : AutoCAD 2012
Rename File To : No Files to download.
Select blocks, contours, and more.

Engineering technician Hayden Clarke sends us an AutoCAD tip that can help you make object selections more efficiently.

"Filter (Fi) is a very useful tool that could potentially improve the efficiency of any job, but not all users are aware of it. Some of my coworkers have used AutoCAD since it was first released, but have never used this command — and in some cases, have never even heard of it.

"Filter can be used to select blocks in a drawing that have a certain name, pick contours by elevation (even contours above or below a certain elevation), and much more. Quite often I use it to clean up imported drawings by selecting text but not by layer, or selecting text with a certain color, and moving it to my own text layer. This command is well worth the time spent to learn how to use it. Once you do, some strenuous tasks will become very easy."

Notes from Cadalyst Tip Patrol: Many times we need to be very specific in what we edit in AutoCAD. Isolating layers is one method, but what if everything you need is only on one layer, with objects that you don't want? You can go through and select the items one at a time, or you could use the Filter tool. This tool can also save your frequently used filter settings.

Editor's Note: The code in Dave White's comment below has been repeated here, for improved clarity:

(defun C:LLOCK()
(initget "Hid 0 Phan Dim Ctr"); Defined layers in your drawing
(setq layer(getkword "Hid/0/Phan/Dim/Ctr <current> ")); Pick layer
(setq f1(list(cons 8 layer)))
(setq layset(ssget "X" f1))
(setq pick(ssget))
(setq entnum 0)
(setq newset (ssadd))
(setq enttot (sslength pick))
(while(< entnum enttot)
(if(ssmemb(ssname pick entnum)layset)
(ssadd(ssname pick entnum)newset)
)
(setq entnum(1+ entnum))
)
(eval newset)

 

Average Rating:
4


User comments
Comment by Jung,M
Posted on 2011-08-01 15:27:42
You can add me to the list of old-time users that wasn't aware of the feature. This looks like it could be very handy. Now if I can remember it's available when I need it....
Comment by Smith,Cyrena
Posted on 2011-08-02 15:53:07
Thanks to reader Dave White for sharing the following comment: While I agree this tip might be handy, it first appears a bit cumbersome when the only thing you might be doing is dealing with just a few layers in your standard drawing. Below is a routine (albeit not original from me) that I deemed a "keeper." I call it LayerLock, or a way to lock onto an object on a particular layer that is hard to select because of clutter or close proximity to other objects on other layers. You can use the selection tool (C:LLOCK) at any command prompt that says SELECT OBJECT(S). I usually pick a crossing window, but you can use a regular window as long as it covers all the possible objects you want to select, SOP for AutoCAD selection. Use it to MOVE, ERASE, COPY, any selection command that you want to modify particular objects. Change the list of layer names in the routine to suit your layer scheme for your standard template settings. Works for me. (defun C:LLOCK() (initget "Hid 0 Phan Dim Ctr"); Defined layers in your drawing (setq layer(getkword "Hid/0/Phan/Dim/Ctr <current> ")); Pick layer (setq f1(list(cons 8 layer))) (setq layset(ssget "X" f1)) (setq pick(ssget)) (setq entnum 0) (setq newset (ssadd)) (setq enttot (sslength pick)) (while(< entnum enttot) (if(ssmemb(ssname pick entnum)layset) (ssadd(ssname pick entnum)newset) ) (setq entnum(1+ entnum)) ) (eval newset) )