1 Hands On Save Custom Toolbar Confi gurations By Steven Lead, ESRI (UK) Ltd. ArcMap. This ensures that toolbars will appear in the correct positions The ArcMap toolbars in ArcGIS 9 behave slightly differently from toolbars regardless of how they were displayed the last time ArcMap was closed. in ArcMap in previous versions of ArcGIS. In older versions of ArcGIS, Other custom toolbar confi gurations can be created by starting ArcMap from if an ArcMap toolbar was docked and then switched off and ArcMap was the Start menu, opening and placing toolbars, and renaming the Normal.mxt closed, when ArcMap was reopened, the toolbar would be displayed in the with an appropriately descriptive name. Change the code in Listing 1 to docked position. With ArcGIS 9, docking a toolbar and closing it and re- reference the new custom Normal.mxt. starting ArcMap will return the toolbar to its default position (i.e., undocked and fl oating above the Data Frame). This article describes one method for Avoid cluttering up the Windows desktop with shortcuts to VBScripts, managing toolbars in ArcMap 9. By creating several customized Normal place all the shortcuts in a folder accessed through the Windows Start menu. templates that incorporate specifi c toolbar confi gurations, the user can Choose Start > Settings > Taskbar & Start Menu, click on the Advanced tab, quickly and easily invoke ArcMap with a variety of toolbar confi gurations and click the Add button. that are tailored to specifi c tasks. Dim fso Dim shell Use Multiple Normal Templates Dim quote When ArcMap is closed, the position of the toolbars is saved to the Normal. mxt template. By making multiple versions of the Normal template and us- Set fso = CreateObject(“Scripting.FileSystemObject”) ing some VBScript code to manage these templates, ArcMap can be started fso.CopyFile “NormalSpatialAnalyst.mxt”, “Normal.mxt” with the toolbars in the desired positions for various projects. This example illustrates a toolbar confi guration that might be used for set shell = WScript.CreateObject(“WScript.Shell”) raster-based projects. In this case, it might be desirable to hide all toolbars quote = Chr(34) except those for the ArcGIS Spatial Analyst and ArcGIS 3D Analyst exten- shell.Run quote & “E:\arcgis\Bin\Arcmap.exe” sions and dock these toolbars in particular locations. The following steps will customize the Normal.mxt so that these toolbars—docked in specifi c Listing 1: VBScript for using custom Normal.mxt fi le for positioning toolbars. locations—will appear every time ArcMap is invoked using the VBScript. Normal.mxt document on Windows 2000 and XP will be in C:\Docu- 1. Open ArcMap and position the toolbars in desired locations. ments and Settings\ Close ArcMap.
V11.5 Gold Edition Training Guide Updated J an 2015More info »