5 Simple AutoLISP Selection Sets
Not being a programmer I am not going to get into the technical details of constructing AutoLISP code, but I am going to share with you 5 simple AutoLISP codes to help you make selection-sets. I use these all the time and I even plug them into scripts and macros (more on that later). Here they are:
Select objects on a layer:
(ssget "x" (list (cons 8 "LayerName")))
Replace LayerName with the layer on which objects you want to select.
Select blocks:
(ssget "x" (list (cons 2 "BlockName")))
Replace BlockName with the name of the blocks you want to select.
Select an object type:
(ssget "X" (list(cons 0 "EntityName")))
EntityName could be LINE, LWPOLYLINE, CIRCLE, etc… Experiment with it. For example to select all lightweight polylines, you would type (ssget “X” (list(cons 0 “LWPOLYLINE”)))
Select text with a specific text style:
(ssget "X" (list(cons 7 "TextStyle")))
Replace TextStyle with the name of a text style to select text objects on that text style.
Select objects with a specific linetype:
(ssget "X" (list(cons 6 "LinetypeName")))
Replace LinetypeName with the name of a linetype to select objects with that linetype.
Once you enter a selection set on the command line, simply invoke a command (such as move, if you want to move the objects) and when it asks for a selection, type P for previous. It’s that simple!
Just another way to work lazier smarter!










[...] you know that you can plug in AutoLISP code into your scripts? Let’s say you want to create a selection set of objects on a certain layer and change them to another layer. You could write a script like [...]
5 Simple AutoLISP Selection Sets…
You’ve been kicked (a good thing) - Trackback from CadKicks.com…