scarc2014 florence

19
FINDING VBA FINDING VBA REPLACEMENTS REPLACEMENTS ROBBIE ERVIN ROBBIE ERVIN FLORENCE COUNTY GIS FLORENCE COUNTY GIS 1 19 SLIDES! 19 SLIDES!

Upload: scgisprogram

Post on 06-May-2015

70 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Scarc2014 florence

FINDING VBA FINDING VBA REPLACEMENTSREPLACEMENTS

ROBBIE ERVINROBBIE ERVINFLORENCE COUNTY GISFLORENCE COUNTY GIS

1

19 SLIDES!19 SLIDES!

Page 2: Scarc2014 florence

PRESENTATION OBJECTIVES

1. Discuss challenge of adjusting to changing technology in ArcGIS, particularly doing away with VBA and the programs that we had that were written in VBA

2. Demonstrate to people new to arcpy and Python, what it can accomplish

3. Possibly, show experienced arcpy users some new things that can be done with it

2

Page 3: Scarc2014 florence

PROGRAM GOALS

1. Automate creation of maps and mailing labels for Planning Commission and Board of Zoning meetings to 1. allow non-GIS staff to create maps2. Cut down on time-consuming redundant work3. Cut down on errors from extra data entry

3

Page 4: Scarc2014 florence

PROGRAM STEPS1. User enter Meeting item into db, includes a link of the meeting to each of its items to

each of its parcels involved

2. At command line prompt user enters meeting date

3. Python selects all of the items for that meeting 1. Creates a folder for the item2. Creates a shapefile for the item parcel(s)3. Buffers the parcel(s) and creates a buffer shapefile4. Copies mxd’s for each of the maps needed for the item5. Adds the parcel data source to Aerials, Zoning, Land Use, Vicinity, and the buffer shapefile

to the Buffer mxd6. Zooms to the parcel7. Exports jpg of each of the maps to folder created

4. Loops through parcel owner names of parcel file and buffer file and updates a csv file

5. Opens Word document for mail merge which is linked to csv file

6. Improves the information from tax parcel data to make it look better on the labels

7. Creates labels for each item

4

Page 5: Scarc2014 florence

TIME CONSUMING PROCESS

5

Page 6: Scarc2014 florence

VBA IS NO MORE

6

Page 7: Scarc2014 florence

DB FOR MAPS – SIDE BENEFITS

7

Page 8: Scarc2014 florence

EASY TO SEARCH FOR ARCPY CODE

8

Page 9: Scarc2014 florence

9

FREE IMPORTS IN FREE IMPORTS IN ADDITION TO VAST ADDITION TO VAST FUNCTIONALITY OF FUNCTIONALITY OF BASIC PYTHONBASIC PYTHON

Page 10: Scarc2014 florence

10

SIMPLE COMMAND SIMPLE COMMAND LINE INPUTLINE INPUT

GET MEETING DATA GET MEETING DATA FROM SQLFROM SQL

Page 11: Scarc2014 florence

11

Automate Folder Automate Folder CreationCreation

Page 12: Scarc2014 florence

12

Get Parcels ID for each Get Parcels ID for each Meeting ItemMeeting Item

Select Parcel From Select Parcel From Parcel Map LayerParcel Map Layer

Page 13: Scarc2014 florence

13

Buffer each Parcel in Buffer each Parcel in Item and add to Layer Item and add to Layer to be used in to be used in Generating Mailing Generating Mailing Labels for surrounding Labels for surrounding ownersowners

Page 14: Scarc2014 florence

14

Cleaning up strings to Cleaning up strings to make the Mailing make the Mailing Labels look betterLabels look better

Writing the parcel data Writing the parcel data to a csv file to be used to a csv file to be used in the mailing labels in the mailing labels and as a record of and as a record of parcel ownersparcel owners

Page 15: Scarc2014 florence

15

Using MSWord to do a Using MSWord to do a mail mergemail merge

Page 16: Scarc2014 florence

16

Pointing the data Pointing the data source of the layersource of the layerZooming to the extent Zooming to the extent of the layerof the layer

Page 17: Scarc2014 florence

17

Manipulating elements Manipulating elements on your layouton your layout

Easy to export layout Easy to export layout to a pdfto a pdfA multi-page pdf A multi-page pdf docmentdocmentA jpgA jpg

Page 18: Scarc2014 florence

18

Text Automated by Text Automated by ProcessProcess

Page 19: Scarc2014 florence

19

Label sheet ready for Label sheet ready for printing with data printing with data cleaned up by Pythoncleaned up by Python

Label data straight Label data straight From Parcel attributesFrom Parcel attributes