Map Layout
Without opening a project file it would be nice to understand the content of the project (mxd). This could save lots of time, especially when there are several project files that are being used and not sure which one contains the content needed. The user also doesn’t have to wait for the software to install.
|
- The variable document is defined as the west-end project file (mxd).
- A variable named list is defined which will create a list variable of the type of items in the project file.
- The command ListLayoutElements is used to load information into the variable.
- A loop function is used to display the mapping elements, two parameters of the mapping elements are selected, the name of the element and the type of item. A space is placed between the two elements.
- Once the loop has displayed the information, the variables are deleted to eliminate any locks.
The layout of a map can be changed without having the map project file opened. While most people want to set-up the map elements according to the display needs, there are times such as placing specific elements in certain location that doing the operation outside of the mapping program may be advantageous. For example, say in a certain project a group of maps has been constructed, but the lead designer decided to move the company logo from the lower right corner to the upper right corner on all the maps. Fixing the layout outside of the mapping software might make a better usage of time, especially when multiple project (mxd) files might be part of what requires change.
In Figure 25:
- A variable document is defined to be the west-end project file.
- A loop is used to look at the layout elements, which is looking specifically for the legend element.
- Within the loop is an if statement, which looks specifically for the layout element named ‘Legend’,
- When this statement is true the x and y position of the legend is changed. The project is saved with a new name and the variables are deleted.