CAD FORUM - TIPS & TRICKS | UTILITIES | DISCUSSION | BLOCKS | SUPPORT | HELP & ASSISTANCE
Over 1.134.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips, Civil tips, Fusion tips.
See the new Beam calculator, Engineering calculator, Tolerances, Spirograph generator and Regression curves in the Converters section.
New AutoCAD 2027 commands and sys.variables
CAD tip # 13688:
Question
A
Starting in version 2024, AutoLISP can be used in AutoCAD LT, so you can create selection sets using filters with DXF codes, just like in full AutoCAD. These can be used both for grip selection and for selection at the "Select objects:" prompt in the middle of an AutoCAD editing command.
So for example:
- Select all line geometry (lines, polylines, splines) in the current layout:
(sssetfirst nil (setq ss (ssget "_X" (list '(0 . "*LINE")(cons 410 (getvar "CTAB"))))))ss - Select all green objects in the current layout:
(sssetfirst nil (setq ss (ssget "_X" (list '(62 . 3)(cons 410 (getvar "CTAB"))))))ss - Select all texts starting with an uppercase "A":
(sssetfirst nil (setq ss (ssget "_X" (list '(0 . "*TEXT")'(1 . "A*")(cons 410 (getvar "CTAB"))))))ss - Select all red circles and arcs in the Situation layer:
(sssetfirst nil (setq ss (ssget "_X" (list '(0 . "CIRCLE,ARC")'(8 . "Situation")'(62 . 1)(cons 410 (getvar "CTAB"))))))ss
The ssget filters can also use AND, OR and NOT conditions, parentheses, greater/lesser, wildcard characters, X/Y/Z coordinate components, etc. See examples in other tips.
ACADACLT
5.4.2023
27063×
![CAD Forum - ARKANCE Community - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]](../common/arkance_186.png)

What is the ARKANCE Community?