1 / 22

Intro to ArcMap Customization with Visual Basic

Intro to ArcMap Customization with Visual Basic. Create your own toolbars, buttons, interactive tools, and programs Runs behind the scenes in ArcMap Supported by extensive web help center Great addition to GIS skills on a resume. The ArcMap Interface. Powerful but complicated

fia
Télécharger la présentation

Intro to ArcMap Customization with Visual Basic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intro to ArcMap Customizationwith Visual Basic Create your own toolbars, buttons, interactive tools, and programs Runs behind the scenes in ArcMap Supported by extensive web help center Great addition to GIS skills on a resume

  2. The ArcMap Interface Powerful but complicated Many tasks require a multitude of steps Capabilities buried within many different toolbars Editing. Enough said. Unfortunately Many organizations do just a couple of set tasks and they do them often Many personnel / users who might benefit from simple and straightforward GIS use are not trained in ESRI products Time (training, familiarization) is a limited resource

  3. ArcMap Interface cont. ArcMap (and more) can be customized to incorporate tools that: Provide shortcuts to common tasks Aggregate multiple steps into one click Simplify the built-in ESRI interfaces and tailor them to the problem at hand

  4. Yet more ArcMap Interface ESRI provides an extremely comprehensive object library for its GIS components All components you see here in ArcMap can be accessed behind the scenes

  5. Adding Your Own CommandsFirst Steps • Start with a new toolbar • Add new ‘UIControls’ • Buttons • Tools • Combo Boxes • Edit Boxes • Right-click and add code! • Well…not quite that simple

  6. Right-click toolbar area • Scroll to bottom and click ‘Customize’

  7. Select ‘New’ toolbar • Enter name • Choose to save inside your mxd file • Your new, empty toolbar appears on the screen

  8. Now add controls • Click the ‘Commands’ tab and scroll to bottom of categories • Click ‘New UIControl’ • Select the type of control

  9. Style Controls • Click on the control in the list to give it a new name. • When finished, click and drag the control onto toolbar • Right-click control on toolbar to change label, icon, and specify display options (image only, etc)

  10. Code Window • Also right-click control to specify behavior via code window

  11. Use the ESRI Developer Network to find code examples

  12. Many programming languages are supported in ArcGIS • Finding the examples you need for VBA will take some practice

  13. VBA Code for Selecting Features

  14. VBA Code 2 • Sets up objects for a layer, the map doc, and the main map • Connects the new objects to your open map document, the first data frame, and the first layer in the list • Sets up query object & specify conditions • Sets up selection set object • Assigns the selection set to the results of the select query

  15. Example map document and customized toolbar with 3 specialized buttons

  16. The Zoom to Full Extent button always takes you to the extent of the largest layer • However…

  17. You can create a button that zooms exactly to a certain spot as a shortcut • Or a button that selects a subset of features of interest without the user having to specify the select by attribute query

  18. Classroom Finder 1 • You can tell a button to load a specialized form that takes input, then does processing that you specify in code.

  19. Classroom Finder 2 • Restrict input to options in drop-down boxes . . .

  20. Classroom Finder 3 • You can simplify a query, and then condense the query, zooming, and display of the results as you choose • Beginnings of a classrom finder?

  21. Wrap-Up • Familiarization will require some experimentation, but very rewarding • Full libraries, discussion forums, and code examples online at: • http://edn.esri.com/index.cfm?fa=docLibrary.gateway • Multiple programming languages supported • VB, VB.NET, C, C++, Java

More Related