Working with Zones (ASP - VBScript)

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():

Sub FindZones()
      Dim nRet
      LEADRasterDoc.GetAutoZoneOptions
      LEADRasterDoc.EnableZoneForceSingleColumn = True
      LEADRasterDoc.ShowZoneGridLines = True

      LEADRasterDoc.SetAutoZoneOptions
      nRet = LEADRasterDoc.FindZones(0, True)
      If (nRet = 0) Then
         Response.Write "Automatic zones method finds all available zones into the specified pages successfully" + "<BR>"
      Else
         Response.Write "Error" + CStr(nRet) + "in finding available zone in the specified page" + "<BR>"
      End If
End Sub

Sub ZonesCount()
      Dim nZoneCount
      nZoneCount = LEADRasterDoc.ZoneCount(0)
      Response.Write "Total Zones count = " + CStr(nZoneCount) + "<BR>"
End Sub

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.