Class Filter Expression
ECSQL allows filters by class
<ECClassId>|<expr> IS [NOT] ( [ONLY] <qualified-classname-1> [, [ONLY] <qualified-classname-2>, ...])
See Reference Docs for more information on Class Filters
Example
Try it yourself
Goal: Returns elements only if it's either of class GeometricElement3d, GeometricElement2d, or any of their sub-classes
ECSQL
SELECT * FROM bis.Element WHERE ECClassId IS (bis.GeometricElement3d, bis.GeometricElement2d)
Try it yourself
Goal: Returns elements only if it's exactly of the specified classess - sub-classes are not included
ECSQL
SELECT * FROM bis.Element WHERE ECClassId IS (ONLY Generic.PhysicalObject, ONLY BisCore.LightLocation)
Try it yourself
Goal: Inverts the selection set
ECSQL
SELECT * FROM bis.Element WHERE ECClassId IS NOT (ONLY Generic.PhysicalObject, ONLY BisCore.LightLocation)
Last Updated: 13 May, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.