Working with Zones (ASP - JavaScript)

Take the following steps to add code to the existing page that will let you manipulate zones:

1.

Start with the program you created in Working with Pages

2.

Add the following code to the file before the call to AddPage():

function FindZones()
{
      var nRet;
      LEADRasterDoc.GetAutoZoneOptions();
      LEADRasterDoc.EnableZoneForceSingleColumn = true;
      LEADRasterDoc.ShowZoneGridLines = true;

      LEADRasterDoc.SetAutoZoneOptions();
      nRet = LEADRasterDoc.FindZones(0, true);
      if (nRet == 0)
         Response.Write("Automatic zones method finds all available zones into the specified pages successfully" + "<BR>");
      else
         Response.Write("Error" + nRet + "in finding available zone in the specified page" + "<BR>");         
}

function ZonesCount()
{
      var nZoneCount;
      nZoneCount = LEADRasterDoc.ZoneCount(0);
      Response.Write("Total Zones count = " + nZoneCount + "<BR>");
}

3.

Add the following code before the call to RemovePage():

FindZones();
ZonesCount();

4.

Run your page to test it.

5.

Save this page to use for testing other code samples.