Customizing Arc GIS Spring 2008 1 GISC 6382

  • Slides: 17
Download presentation
Customizing Arc. GIS Spring 2008 1 GISC 6382 Applied GIS UT-Dallas Briggs

Customizing Arc. GIS Spring 2008 1 GISC 6382 Applied GIS UT-Dallas Briggs

Customization in ARCGIS Two levels of Customization • Customizing the Interface – To create

Customization in ARCGIS Two levels of Customization • Customizing the Interface – To create more efficient user interfaces • For yourself (e. g. grouping frequently used tools) • For specialized applications (e. g. simplified interface for data entry operators) – To access capabilities not on the standard interface • Supplied as part of Arc. GIS but not on the standard interface (many!) • Downloaded from the web – From ESRI web site, supplied by ESRI or users – From other web sites • Developed by you • Developing Additional Capabilities – Automating repetitive tasks – Creating new analytical procedures Our focus here will be on customizing the interface. GIS 5317 Programming for GIS will focus on developing additional capabilities. 2 GISC 6382 Applied GIS UT-Dallas Briggs

Options for Developing Additional Capabilities Current Generation—ESRI ARCGIS • Modelbuilder – Multi-step, sequential processing

Options for Developing Additional Capabilities Current Generation—ESRI ARCGIS • Modelbuilder – Multi-step, sequential processing of Arc. Tools, using a visual development environment which comes as part of Arc. GIS • Python, Jscript and VBScript – standardized and relatively simple scripting languages for repetitive processing, including loops and decision trees, using Arc. Tools – Python scripts can be generated from Modelbuilder • Visual Basic for Applications – Permits writing of VB macros for sophisticated customization and development within standard Arc. GIS (Arc. Map/Arc. Catalog) interface (and thus requires license for these) – may incorporate Arc. Objects, the COM compliant software objects out of which Arc. GIS is constructed. • Arc. GIS Engine – Set of embeddable GIS components (Arc. Objects software objects) for use in building custom applications, independent of Arc. GIS interface – Runs under Windows, Unix and Linux, with support for Java, C++, COM and. NET 3 GISC 6382 Applied GIS UT-Dallas Briggs

Options for Developing Additional Capabilities Earlier Generations: ESRI • Map. Objects – Microsoft COM

Options for Developing Additional Capabilities Earlier Generations: ESRI • Map. Objects – Microsoft COM compliant objects used to incorporate geographic capability in standard IT applications, introduced around 1997 – Replaced by Arc. Engine/Arc. Objects • Avenue – The proprietary object oriented programming language used for ESRI’s first GUI based product, Arc. VIEW, introduced in 1993, – Not compatible with Arc. GIS 8 or 9 – Most Avenue-based applications have now been replaced with Arc. GIS 8/9 equivalents • AMLs: Arc Macro Language – The scripting language associated with ESRI’s original Arc. Info product introduced in 1981 – Can still be run within Arc. GIS 9 via: • Arc. Info Workstation interface • Via a tool on a toolbar in Arc Map or Arc. Catalog 4 GISC 6382 Applied GIS UT-Dallas Briggs

Options for Developing Additional Capabilities Current Generation—non-ESRI • Other major GIS software vendors have

Options for Developing Additional Capabilities Current Generation—non-ESRI • Other major GIS software vendors have equivalents to Arc. Engine e. g. Map. Info Map. X • Tatuk. GIS specializes in providing GIS software component objects (and there are others) – http: //www. tatukgis. com/ • Google Map and Google Earth mashups, combining your own data and applications with Google Map or Google Earth using kml scripts (keyhole markup language) – http: //magellan. utdallas. edu/biomap/ 5 GISC 6382 Applied GIS UT-Dallas Briggs

Customization Dialog Box • A graphic interface for customization. To open – Go to

Customization Dialog Box • A graphic interface for customization. To open – Go to Tools>Customization – Or, double click on empty area in a toolbar • Modify user interface – – Turn toolbars on and off Create new toolbars Create new controls Add, delete, and move controls (buttons and menus) – Manage shortcut keys 6 GISC 6382 Applied GIS UT-Dallas Briggs

Creating a new tool bar • Organize related controls • Name the toolbar •

Creating a new tool bar • Organize related controls • Name the toolbar • Drag commands, controls, or macros onto (off) the toolbar 7 GISC 6382 Applied GIS UT-Dallas Briggs

Creating a Menu • New Menu and Menu Items 8 GISC 6382 Applied GIS

Creating a Menu • New Menu and Menu Items 8 GISC 6382 Applied GIS UT-Dallas Briggs

Adding commands to context menus • • Add the context Menu toolbar Drag commands

Adding commands to context menus • • Add the context Menu toolbar Drag commands onto the context menu 9 GISC 6382 Applied GIS UT-Dallas Briggs

Shortcut Keys • Keyboard button in the customize dialog • Change the shortcut key

Shortcut Keys • Keyboard button in the customize dialog • Change the shortcut key for any command 10 GISC 6382 Applied GIS UT-Dallas Briggs

UI Controls • User Interface (UI) Controls – UIButtons, UItools, UIEdit. Boxs, and UICombo.

UI Controls • User Interface (UI) Controls – UIButtons, UItools, UIEdit. Boxs, and UICombo. Boxes • Control Properties – – Text or no text Image Caption Group 11 GISC 6382 Applied GIS UT-Dallas Briggs

Visual Basic Editor • Tools> Macros> Visual Basic Editor • View Source 12 GISC

Visual Basic Editor • Tools> Macros> Visual Basic Editor • View Source 12 GISC 6382 Applied GIS UT-Dallas Briggs

Tool. Tips • Help for your controls • Set the Tooltip property • Help

Tool. Tips • Help for your controls • Set the Tooltip property • Help message in the status bar (Message) 13 GISC 6382 Applied GIS UT-Dallas Briggs

Save Customizations • Arc. Map has three level of storage – Normal Template (Normal.

Save Customizations • Arc. Map has three level of storage – Normal Template (Normal. mxt): Affect all documents – Template (My. Temp. mxt): Affects all documents using this template – This Document (Myproject. mxd): Affects this document only • Arc. Catalog only uses a normal template 14 GISC 6382 Applied GIS UT-Dallas Briggs

Examples • Code for Fixed Zoom-In • What about Fixed Zoom-out Dim p. Doc

Examples • Code for Fixed Zoom-In • What about Fixed Zoom-out Dim p. Doc As IMx. Document Dim p. Env As IEnvelope Set p. Doc = This. Document Set p. Env = p. Doc. Active. View. Extent p. Env. Expand 0. 5, True p. Doc. Activated. View. Extent = p. Env p. Doc. Activated. View. Refresh 15 GISC 6382 Applied GIS UT-Dallas Briggs

AMLs: Arc Macro Language • The scripting language associated with ESRI’s original Arc. Info

AMLs: Arc Macro Language • The scripting language associated with ESRI’s original Arc. Info product • Essentially allows Arc. Info commands to be saved in a text file and then executed in batch • Based on the operating system for the Prime minicomputer of the 1970 s • Conceptually similar to the old DOS. bat files • Was the only way to be productive in Arc. Info version 7 and earlier! • Many AMLs still exist and need to be converted • Still runs in Workstation Arc. Info • Arc. Catalog will generate and save AML scripts • With the introduction of scripting capabilities in Arc. GIS 9. 0, AMLs no longer useful – Most AML capabilities can be re-created with python script. 16 GISC 6382 Applied GIS UT-Dallas Briggs

Running an AML in Arc. Gis Workstation • • Initiate an Arc. GIS Workstation

Running an AML in Arc. Gis Workstation • • Initiate an Arc. GIS Workstation session If necessary, use the CREATWWORKSPACE command to create a workspace – • Use the command WORKSPACE to move into the new workspace – • &TERM 9999 DISPLAY 9999 &ECHO &ON (directs AML output to your terminal) (directs any graphic output to terminal—not needed here) (sends debug info to terminal—turn off with &OFF) &RUN utd_newtin. aml After AML finishes, check that AML tasks completed successfully, e. g. use the DIRECTORY TIN command to list TINs created – • Use Explorer to copy p: datap 6382exercisescustomutd_newtin. aml Use Wordpad to specify appropriate directory for CREATETIN command Run the AML with the &RUN command – • c: usrinicustom Establish the necessary environment for running an AML – – – • w Use a standard text processor (e. g. Wordpad) to create/edit your AML and be sure it is saved as a text file with the extension of. aml (place double quotes around name in save box e. g. “newaml. aml”) – – • cw c: usrinicustom DIR TIN For practice, run the AML: giscity. aml – Issue the command END in the Arc window to close the graphic window. 17 GISC 6382 Applied GIS UT-Dallas Briggs