CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.096.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator and the updated Barcode generator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 11179:

Question

CAD 
 %  platform  category 
A
Using the LISP filter "-4" you can easily select DWG objects, which have their definition/reference point above or below a given limit set on the individual X,Y,Z components of their coordinates. So you can select/filter objects with a reference point in a positive or negative Z-elevation, or in the positive XY half-space, or in the positive XYZ octant.

See examples of selecttion sets (can be input on the "Select objects:" prompt)

Negative Z-elevation:
(ssget "_X" '((-4 . "*,*,<")(10 0 0 0)))

Positive XY half-space, any Z:
(ssget "_X" '((-4 . ">=,>=,*")(10 0 0 0)))

Positive XY half-space, only "zero" Z (flat):
(ssget "_X" '((-4 . ">=,>=,=")(10 0 0 0)))

Positive octant XYZ:
(ssget "_X" '((-4 . ">=,>=,>=")(10 0 0 0)))

You can also combine the filters through AND, OR, NOT. Please note that only the reference point is checked (e.g. a circle center, polyline starting point), not the whole bounding box of a drawing entity.

ACAD
100% *CAD
22.11.2016    7148×  
applies to: AutoCAD ·

See also:
Tip 14620:Converting object data (OD) to XData (XD) in AutoCAD Map 3D.
Tip 13737:Formatting leading zeros in AutoCAD fields (and automatic field update).
Tip 13716:HYPERLIST - list of all used URLs.
Tip 13688:How to select all DWG objects of a certain type in AutoCAD LT? (texts, circles...)
Tip 13049:Bulk 3D rotation of selected objects around individual axes.


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
  



Featuring:
DwgTextTranslator translates a series of drawings from one language to another using MS Access.
Download a fully functional trial version.


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist