Distribute2

The Distribute2 method distributes selected objects horizontally or vertically with equal spacing or overlap within the margins or within the selected objects bounding box.

Syntax

object.Distribute2( horizontally, distributeInMargins )

 

Parameter Type Description
horizontally Boolean required, specifies if objects are distributed horizontally. When set to True, objects are distributed horizontally. When set to False, objects are distributed vertically.
distributeInMargins Variant optional, when set to True, distributes objects between margin limits, with even space between objects as well as even space between end object and margin limit. When set to False or not used, distributes objects within the bounding box limits of the current selected objects.

 

Example 1

The following example demonstrates how to distribute objects horizontally within the objects' bounding box.

'Distributes objects horizontally

Selection.Distribute2(True)

Example 2

The following example demonstrates how to distribute objects vertically within the margins.

'Distributes objects vertically

Selection.Distribute2(False, True)

 

Used by: AutoSelection Collection