You are here: Function Reference > Alphabetical Listing > I > SectionRect

SectionRect

ImageRect

ImageRect has been replaced with SectionRect. ImageRect and SectionRect have same functionality; the only change is to the function name. The existing ImageRect scripts will continue to function and will not require any modification.

Use this procedure/function to retrieve the rectangular coordinates of a section in a form set (document).

Syntax

SectionRect (PrefixVariable, Section, Form, Group)

Parameter

Description

PrefixVariable

Enter the coordinates for the section.

Section

Enter the name of a section in the form set. The default is the current section.

Form

Enter the name of the form that contains the section. The default is the current form.

Group

Enter the name of the form group that contains the form and section. The default is the current form group.

This procedure gets the coordinates for the section and stores them in the defined variable names. If the prefix name variables do not exist in DAL, the system creates them. The system creates four internal variables: prefix name.top, prefix name.left, prefix name.bottom, and prefix name.right. If these variables exist, the system modifies them with the new coordinates.

Example

For these examples, assume the prefix name is MyImage, the current section is Image25, the form is Input_form, and the form group is package1. The coordinates are:

 

Image25

Image50

top

25

125

left

50

150

bottom

100

200

right

200

200

Here are some examples:

Procedure

Result

Explanation

SectionRect ("MyImage")

Internal variables equal:

MyImage.top=25

MyImage.left=50

MyImage.bottom=100

MyImage.right=200

The procedure returns the coordinates for the current section (Image25) on the current form in the current form group

If it does not exist, the procedure returns zero (0).

SectionRect ("MyImage", "Image50")

Internal variables equal:

MyImage.top=125

MyImage.left=150

MyImage.bottom=200

MyImage.right=200

The procedure returns the coordinates for Image50 on the current form in the current form group.

If it does not exist, the procedure returns zero (0).

SectionRect ( "m", "MVF\2", "XYZ")

Internal variables equal:

m.top = 75

m.left = 125

m.bottom = 300

m.right = 225

Gets and stores the coordinates for the second occurrence of the section MVF on the form XYZ into the DAL target variables.

If it does not exist, the procedure returns zero (0).

See also