CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 5708

CAD tip CAD tip # 13688:

   
Question CAD 
 %  platform  category 
Q - question

How to select all DWG objects of a certain type in AutoCAD LT? (texts, circles...)

A - answer 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
100% *  CAD 
5.4.2023    22883×  
Prices - CAD eShop:
applies to: AutoCAD · AutoCAD LT ·

See also:
Tip 12210:How to erase a specific object type in all DWG layouts?
Tip 11179:Select objects in negative elevation or in a given 3D octant.
Tip 10015:How to select and modify objects in ALL layouts of the DWG?
Tip 7249:How to select all drawing entities containing a given text?
Tip 6403:Select all specific texts in a drawing.


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 glossary   



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