Import regions from shapefiles
To import regions (layout regions and exclusion regions) from a shapefile using scripting use the following simple script (using the correct file path to your file):
SiteLayout siteLayout = Workbook.Domain.VisibleSiteLayout;
siteLayout.ImportRegionsFromShapefile(@"C:\data\myshapefile.shp");
See Importing Layout and Exclusion Regions from Shapefiles for more details.
Import regions from Google Earth files
To import regions (layout regions and exclusion regions) from a Google Earth File (.kmz
or .kml
) using scripting
use the following simple script (using the correct file path to your file):
SiteLayout siteLayout = Workbook.Domain.VisibleSiteLayout;
siteLayout.ImportRegionsFromGoogleEarthFile(@"C:\data\mygoogleearthfile.kmz");
See Importing Layout and Exclusion Regions from Google Earth files for more details.