The PrintLayout program was developed by Egge-Jan Pollé as a template for creating a series of maps by iterating through a series of polygons in a single map layer. This mabasic program was menu based.
The Atlas program, which utilises the new ribbon interface, was developed from this PrintLayout program and consists of a number of modules controlled via the AtlasRibbonInterface module.
The AtlasRibbonInterface module contains the Main program from which four ribbon tabs are accessed.
The first ribbon tab is called Atlas Example and calls the module Atlas_Dialog.
The second ribbon tab is called Mask Settings and calls the module RibbonMaskSettings.
The third ribbon tab is called Data Settings and calls the module InputAtlasDefaultSettings.
The fourth ribbon tab is called About Atlas Example and calls the module AtlasAbout.
The Atlas_Dialog checks that tables are open then it calls CartoLegend.
CartoLegend checks that the map is in focus. Then it cycles through the available layers for map layers and then checks to see if there is a thematic layer.
CartoLegend then calls ThematicName.
ThematicName checks that a least one window is open.
Then there is a check again to ensure the map window is in focus.
Next the module iterates through the layers to check for a thematic layer. If there is a thematic layer then the cartographic boolean variable is set to False.
Then control returns to Atlas_Dialog.
Next this module checks to see if the ShadeInfo1 module has been called previously. If it has the variable sShadeText is reset.
Next the ShadeInfo1 module is called.
ShadeInfo1 first checks whether sShadeText contains text. Next the Windows information concerning the thematic layer is read into the variable sText.
The module parses the text so that it can be used to create a thematic output at the layout stage.
Then control returns to Atlas_Dialog and the layers are iterated through to enable the user to choose a specific layer and column to create maps of individual polygons from.
Next MLB module is called.
This module starts by checking to see if the default settings are needed.
Then a check is made to see if the regions array needs resetting.
A call is then made to PopulateRegionsArray which populates the array based on the regions chosen. In the MLB module the dialogue box is shown to enable the user to choose one or more regions to print. A4 and A3 options are made available.
The MLB module then calls CreateMaskMaps
The CreateMaskMaps module first checks to see which paper size has been chosen.
Then a SQL query is run to select the region to be printed.
Next the module checks to see if the output should be portrait or landscape.
Then, if appropriate, the variables from the attribute table for the variable text output is initialised. You would update this section of code with your own map data variable information.
Next a map is made of the selected region.
A check is made to see if a mask is required. If so the CreateRibbonMask module is called.
Next the AddMaps module is called.
This module iterates through the map layers and adds them to the selected region layer.
If there is a thematic layer then the command sShadeText is run. CreateMaskMaps ends by closing the various tables used in the map creation.
The process is repeated until all the selected regions have been printed.
You can obtain the Atlas program from the Pitney Bowes community download page with this link
Joe Short BSc has been involved with various mapping solutions for over twenty years. If you are considering implementing a GIS or have ArcGIS Pro, MapInfo Pro or QGIS training requirements, jps services would be happy to be of assistance to your organisation.