The line above will select all entities inside or touching a triangle defined by the points 5,5 8,8 and 8,3. (ssget "_W" (list 5.0 5.0)(list 8.0 8.0))Ībove is an example that will select objects inside a window from 5,5 to 8,8. Let’s look at some other selection methods. Entities on frozen layers are included when using the “_X” selection method. This tells the (ssget) function to evaluate every entity in the drawing and then the filtering mechanism will filter out everything except MTEXT and TEXT. But what if you don’t want to bother the user to select entities, you just want to select ALL the MTEXT and TEXT entities in the drawing? (ssget "_X" '((0. This is a better way to select MTEXT and TEXT entities.
However, you have to be careful because this will also select RTEXT entities, and if your code is not equipped to deal with RTEXT, it may fail. At first, this looks like a good way to select TEXT and MTEXT, and it is. This is the same as above, except now any entity type that ends in TEXT is added to the selection set. This prompts the user for a general selection set, but only TEXT entities are added to the resulting selection set. (ssget) is a powerful function that can do more than you probably realize. If you have written routines with Autolisp, then you have probably used the (ssget) function to select entities on the screen, either automatically or by prompting the user.