Set the pitch value
If your site contains a large number of layout regions and you want to set the same pitch value for them all it can become very tedious to do this in the user interface.
A much quicker way is to use scripting to achieve this.
The following script sets the pitch value of each layout region to 12 metres (modify the value to the pitch value you wish!):
public void Execute()
{
// Get the currently visible site layout
SiteLayout siteLayout = Workbook.Domain.VisibleSiteLayout;
// Loop through each layout region in the site layout
foreach (LayoutBoundary layoutRegion in siteLayout.LayoutBoundaries)
{
// Set the pitch of the first spacing zone
layoutRegion.TrackerLayoutParameters
.RowPositionParameters
.SpacingZoneFromTop
.Pitch = 12;
// Toggle the AutoFillAutomatically property. This will force it to re-lay out
// the rows using the new pitch value.
layoutRegion.AutoFillAutomatically = false;
layoutRegion.AutoFillAutomatically = true;
// Refresh the display
layoutRegion.RefreshDisplay();
}
// Update the site layout cache
siteLayout.UpdateCache();
}
Note
This only sets the first pitch value for each layout region. There can be more than one pitch value if you have used the 'Edit Lines' tool to set multiple anchor rows.