![]() |
![]() |
How can objects be searched for?
You can perform queries that search a CorelDRAW document for objects (that is, shapes) with specific properties. To do this, you use CQL in conjunction with the object-model methods Shape.Evaluate, Shapes.FindShape, or Shapes.FindShapes. The properties of the shape object can be accessed by inserting an at sign ( @
) in front of the method. For example, ActiveShape.Evaluate("@name")
calls the Name method of the shape object, which is currently selected in the document.
Consider the following example, which selects all rectangles wider than two inches:
ActivePage.Shapes.FindShapes(Query := "@type = 'rectangle' and @width > {2 in}").CreateSelection
You can search for shapes, fills, outlines, colors, and global objects. For more information, please see the following sections:
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.