NOTE: Since the modification process is rather arduous and tricky, you may prefer to download the modified default.apr from my ArcView Web Page (address given at the end of this file). ======================================================================= TO CREATE A "ZOOM PREVIOUS" TOOL IN THE DEFAULT PROJECT: 1) Begin an ArcView 2.1 session and open $HOME\default.apr [$HOME is an environment variable set by ArcView's startup script, usually C:\TEMP on a PC, and should be the directory that appears in the "Save" dialog box] If default.apr doesn't exist yet, create it by saving "Untitled" as default.apr in the $HOME directory 2) Create a new script by double-clicking on the "Scripts" icon 3) Use "Load System Script..." under the "Script" menu to load in Project.New 4) Use "Properties..." under the "Script" menu to rename Script1 Project.New 5) Add the following line to the end of the script: _ViewExtent = Stack.Make 6) Compile the script by hitting the Compile button 7) Use "Embed Script" under the "Script" menu to embed the script 8) Repeat steps 2-7 to modify Project.Open and Appl.Initialize 9) Save default.apr, and open it once again [to initialize the global variable] 10) Modify the following scripts: View.ZoomFullExtent View.ZoomIn View.ZoomInTool View.ZoomOut View.ZoomOutTool View.ZoomPan View.ZoomToSelected View.ZoomToThemes by adding the following line to the BEGINNING: _ViewExtent.Push(av.GetActiveDoc.GetDisplay.ReturnExtent) 11) Create a new script and name it View.ZoomPrev 12) Add the following text: av.GetActiveDoc.GetDisplay.SetExtent(_ViewExtent.Pop) 13) Compile and close the script 14) Create a new script and name it View.ZoomPrevUpdate 15) Add the following text: SELF.SetEnabled(_ViewExtent.Depth > 0) 16) Compile and close the script 17) Double-click on the tool bar 18) Choose Type: View and Category: Buttons 19) Create a new button 20) Double click the "Click" entry and select View.ZoomPrev 21) Double click the "Update" entry and select View.ZoomPrevUpdate 22) Double click the "Icon" entry and select Undo 23) Double click the "Help" entry and enter the text: Zoom to Previous Extent 24) Save default.apr, exit ArcView, and you're done! ======================================================================= TO INSTALL A ZOOM PREVIOUS BUTTON IN A SPECIFIC PROJECT: 1) Follow steps 1-9 above to initialize the global variable 2) Open the desired project and follow steps 10-23 3) Close the "Customizer" and save the project ======================================================================= Mark Cederholm plp@pierssen.com http://www.pierssen.com/PC/arcinfo.htm http://www.pierssen.com/arcview/arcview.htm