Skip to main content
The functions listed in the table below can only be used in the Advanced pre-search relations section. Each function specifies a fuzzy rectangle for the search area or adds rectangles to an array of excluded rectangles.

Function

Description

Void Leftof( XInterval x, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the left of the point x.End - offset.

Void Leftof( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the vertical half-plane to the left of the point fuzzyRect.Left.End – offset.

Void Leftof( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the left of the point hyp.Left.End - offset.

Void LeftOf( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the vertical half-plane to the left of the point hyps.Left.End – offset. Global coordinates are used.

Void Rightof( XInterval x, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the right of the point x.Start + offset.

Void Rightof( FuzzyRect fuzzyRect, Distance offset = 0 )

E.g.

You can specify that the element search area is located to the right of the intersection area which is formed by the Element1 and Element2 fuzzy rectangles.

FuzzyRect intersection = Element1.FuzzyRect AND Element2.FuzzyRect; RightOf: intersection;

Void Rightof( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the vertical half-plane located to the right of the point hyp.Right.Start + offset.

Void RightOf( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the vertical half-plane to the right of the point hyp.Right.Start + offset. Global coordinates are used.

Void Above( YInterval y, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located above of the point y.End - offset.

Void Above( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the horizontal half-plane above the point hyp.top.End – offset.

Void Above( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located above of the point hyp.top.End - offset.

Void Above( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the horizontal half-plane above the point hyp.top.End – offset. Global coordinates are used.

Void Below( YInterval y, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located below of the point y.Start + offset.

Void Below( FuzzyRect fuzzyRect, Distance offset = 0 )

Limits the search area by the horizontal half-plane below the point hyp.Bottom.Start + offset.

Void Below( Hypothesis hyp, Distance offset = 0 )

Limits the search area to a rectangle which is the result of intersecting the rectangle of the page with the horizontal half-plane located below of the point hyp.Bottom.Start + offset.

Void Below( HypothesisInstances hyps, Distance offset = 0 )

Limits the search area by the horizontal half-plane below the point hyp.Bottom.Start + offset. Global coordinates are used.

Void Exclude( Hypothesis hyp )

Excludes the region of the hyp hypothesis from the search area. If the hyp hypothesis is not found, excludes the internal rectangle of the search area of the hyp hypothesis.

Void Exclude( Rect rect )

Excludes the rect rectangle from the search area.

Void Exclude( RectArray rectArray )

Excludes the rectArray array of rectangles from the search area.

Void ExcludeRect( XInterval left, YInterval top, XInterval right, YInterval bottom )

Excludes the fuzzy rectangle described by the ranges left, top, right, and bottom from the search area.

Void ExcludeSet( ImageObjectSet set )

Excludes from the search area the array of rectangles of the set set of objects.

Void Exclude( HypothesisInstances )

Excludes from the search area the region of the instances of the hypothesis.

Void RestrictSearchArea( FuzzyRect fuzzyRect )

Limits the search area to the fussy rectangle fuzzyRect. Global coordinates are used.

Void RestrictSearchArea( FuzzyRect, IntArray pages )

Limits the search area by the fuzzy rectangle fuzzyRect. Specify the local coordinates and page range pages.

Void RestrictSearchArea( FuzzyRect, SearchAreaPageSetType )

Limits the search area by the fuzzy rectangle fuzzyRect. Specify the local coordinates and page range of the type SearchAreaPageSetType.

Void RestrictSearchArea( RectArray rectArray )

Limits the search area to the array of rectangles rectArray. Global coordinates are used.

E.g.

You can specify that the boundaries of the search area of the current element are defined by the boundaries of the rectangles of the elements ElementName1, ElementName2, and ElementName3. If any of the elements are not detected, when accessing this function, the search area of the current element will be defined by the boundaries of the search areas of the corresponding elements.

RestrictSearchArea: RectArray(ElementName1.Rect or ElementName2.Rect or ElementName3.Rect);

Void RestrictSearchArea( RectArray, IntArray pages )

Limits the search area by the array of rectangles rectArray. Specify the local coordinates and page range pages.

Void RestrictSearchArea( RectArray, SearchAreaPageSetType )

Limits the search area by the array of rectangles rectArray. Specify the local coordinates and page range of the type SearchAreaPageSetType.

Void RestrictSearchArea( Region region )

Limits the search area to the region region. Global coordinates are used.

E.g.

You can specify that the search area of the current element is limited by the region of the element ElementName.

RestrictSearchArea: ElementName.Region;

Void RestrictSearchArea( Region, IntArray pages )

Limits the search area by the region. Specify the local coordinates and page range pages.

Void RestrictSearchArea( Region, SearchAreaPageSetType )

Limits the search area by the region. Specify the local coordinates and page range of the type SearchAreaPageSetType.

E.g.

You can specify that the element must be searched for in the search area on even pages.

RestrictSearchArea: searchArea, EvenPages;

Void RestrictSearchArea( SearchAreaPageRestriction pageRestriction, IntArray pages )

Limits the page range on which to search without limiting the search area on the pages themselves. The pageRestriction parameter acquires the only value: WholePage.

E.g.

You can specify that the element must be searched for on pages 2, 4, 7-9.

RestrictSearchArea: WholePage, 2 << 4 << 7 << 8 << 9;

Void RestrictSearchArea( SearchAreaPageRestriction pageRestriction, SearchAreaPageSetType )

E.g.

You can specify that the element must be searched for on the last page.

RestrictSearchArea: WholePage, LastPage;

Note. You can use RSA alias instead of full name RestrictSearchArea.

Different constraints for the same page are used jointly, and for different pages independently. (The search is carried out on the pages for which at least one constraint has been specified.)

Auxiliary functions that define the search area

Rect PageRect()

The rectangle of the current page in global coordinates used to specify a search area that depends on the page.

The PageRect can only be used to specify a search area.

E.g.

To specify that the element is located in the bottom half of a page (the exact page is not known in advance), write:

Below: PageRect.Top + PageRect.Height / 2;

In all other cases use the construction Page( N ).Rect to get the rectangle of the page number N or DocumentRect to get the rectangle of the entire document. You can also use the PageNumber function to specify a search area that depends on the page.

Int PageNumber()

E.g.

Suppose you have a repeating element SearchElements.PageHeader. To search on each page below the instances of this element, write

Below: SearchElements.PageHeader.AllInstances.PageAreaGlobal( PageNumber ).FuzzyRect, 0 * dot;