Altova MapForce 2025 Enterprise Edition

Assignments enable you to assign positions to various locations and then refer to these locations in expressions. References to user-defined names must be put in square brackets inside expressions. One of the possible use-case scenarios of assignments could be as follows: For example, you might have different positions of margins, depending on whether a page number is odd or even. The differences in the margin positions might influence the way you split pages. In this case, you may want to use assignments conditionally (i.e., as children of a When object placed inside an Ordered Choice object), which will allow you to set, for example, a Horizontal Anchor on the left or on the right edge of a page, depending on whether the page is odd or even.

 

For information about how to add objects to the model tree, see Insert an Object.

 

Types of assignments

There are two categories of assignments: simple and algorithmic assignments. For details, see the subsections below. For an example that uses simple and algorithmic assignments, see our video tutorial (click Watch Tutorial Video in the Help menu).

 

Simple assignments

This type of assignments is called simple, because such assignments accept constant values or expressions, as opposed to algorithmic assignments (see description below) that assign locations dynamically. Simple assignments provide one variant for each data type that exists and assign a name to the result of the computation. The following simple assignments are supported:

 

Boolean Assignment

Number Assignment

Distance Assignment

Horizontal Anchor Assignment

Vertical Anchor Assignment

Rectangle Assignment

 

All the simple assignments have the following properties in the Properties pane: Name and Expression. The name property refers to an assignment's name that is used in the model tree in the Schema pane and in the PDF View pane. The Expression property refers to the region where an assignment is located. The Expression property can have a constant value or an expression. The Rectangle assignment also includes the locations of the left, right, top, and bottom parts of the region.

 

The screenshot below shows the properties of a Horizontal Anchor assignment called Sep2.

PDFEX_HorAnchorAssignment

Algorithmic assignments

This type of assignments is algorithmic and dynamic, because such assignments process the current page in order to figure out what value to assign. The following algorithmic assignments are available:

 

Horizontal Location Finder

Vertical Location Finder

Horizontal Boundary Finder

Vertical Boundary Finder

 

Algorithmic assignments have the following properties (Properties pane):

 

The Name property refers to an assignment's name that is visible in the model tree in the Schema pane and as a label in the PDF View pane.

The Region property indicates the location of an assignment on the page. For an example of a region, see the Region property in the Split object.

The Direction property (only for Horizontal and Vertical Location Finders) refers to a search direction (forward or backward). This property can be used together with the Skip parameter (see below). Thus, it is possible to find the Nth or Nth-last feature.

The Skip property enables you to skip the first N results in the direction specified in the Direction property.

The Method property refers to the mechanism for locating split positions, based on which a specific region will be cut into parts. For more information, see the Method property in the Split object.

 

© 2018-2024 Altova GmbH