Set the tracker system on all layout regions
If you have many layout regions containing trackers and you wish to change the tracker system that is used in all of the layout regions, it can be tedious to do this manually in the UI.
You can do this much more quickly with the following simple script:
// Choose the tracker system you wish to use
TrackerSystemSpecification trackerSystem = Workbook.ComponentLibrary.TrackerSystemSpecifications.First();
// Choose the site layout you wish to update
SiteLayout visibleSiteLayout = Workbook.Domain.VisibleSiteLayout;
// Iterate through all the layout regions, updating the tracker system specification
// and forcing it to autofill once it has been updated
foreach (LayoutBoundary layoutRegion in visibleSiteLayout.LayoutBoundaries)
{
layoutRegion.AutoFillAutomatically = false;
layoutRegion.TrackerLayoutParameters.TrackerSystemSpecification = trackerSystem;
layoutRegion.AutoFillAutomatically = true;
}