Skip navigation
All People > ian_broad > Ian Broad's Blog > 2015 > April > 13

Ian Broad's Blog

April 13, 2015 Previous day Next day

Find custom geoprocessing tools, and other tutorials on my site.

 

ArcMap allows for a large amount of customization. It’s just a matter of taking the time to set it up the way you want. If you want to add or remove a button from a toolbar, you can. Menus can be customized the same way, but for this guide I’m focusing on toolbars.

 

In order to start customizing toolbars, you need to be in Customize Mode.

 

CustomizeMode.png

 

Once the Customize window is open, you can begin manipulating the toolbars. Right click on a button, and you can now delete it, as well as a few other options.

 

DeleteButton.png

 

___________________________________

 

If you delete a button, and want to get it back you can click on the Commands tab of the Customize window and on the left side select the name of the toolbar which originally contained the button. The available buttons will appear on the right side of the window. Simply drag one up to a toolbar in order to add it back.

 

AddButton.png

 

One of the first ArcMap customizations I make on a fresh install is adding the Start, Stop, and Save editing buttons to the Editor toolbar. It’s just a lot easier than going into the Editor menu every time.

 

EditorToolbar.png

 

___________________________________

 

You can also add often used geoprocessing tools to a toolbar. In the Customize window, go to the Commands tab and on the left side scroll down all the way to the bottom. Click on Geoprocessing Tools, and then click the Add Tools button. Browse to the Toolbox containing the tool you’d like to add. The tool will then be available on the right side of the window. Simply drag it up to the toolbar you want to add it to.

 

By default, the standard ArcGIS toolboxes are located at:


C:\Program Files (x86)\ArcGIS\Desktop10.x\ArcToolbox\Toolboxes

 

AddTools.png

___________________________________

 

The final customization for this guide is setting up keyboard shortcuts. Keyboard shortcuts are extremely useful, and can reduce a lot of unnecessary mouse clicking. In the Customize window, click the Keyboard button at the bottom of the window.

 

KeyboardShortcuts.png

 

In the Customize Keyboard window, in the text box at the top, type the name of the tool you want to add a shortcut for. Then on the left side under Categories click the name of the toolbar that contains the tool, and on the right side under Commands click the tool.

 

Next, click where it says Press new shortcut key, and choose the keyboard shortcut to assign for the tool. I prefer to use ALT + a number at the top of the keyboard. So, I have different tools assigned for when I press ALT + 1, or ALT + 2, etc. Once you choose the keyboard shortcut, remember to click Assign on the right side of the window.

 

AddKeyboardShortcut.png

 

Hope someone finds this helpful! Please leave any questions, or comments below.

Download the GIS Resources Python Add-in for ArcMap - Works with ArcGIS 10.1+
GISResourcesMain.png

 

The GIS Resources Python Add-in adds a toolbar full of useful GIS resources to ArcMap. When you click on one of the buttons, it opens the website in your browser for the resource that was clicked.

 

If the toolbar didn’t automatically add to ArcMap, go to Customize –> Toolbars –> and click on GIS Resources.

 

GISResourcesToolbar.png

 

Current GIS Resources:

GIS Stackexchange

/r/GIS

ArcPy Documentation

ESRI Forums

Free GIS Data

ArcGIS Online

ESRI UC Paper Sessions

ArcGIS Blog

ESRI Videos

 

If you’d like an additional GIS Resources added to the toolbar, just leave a comment below!

 

Check out the following guide to add or remove a button, or add a keyboard shortcut for a button:
Tutorial On Customizing ArcMap Toolbars and Keyboard Shortcuts

 

I hope you find this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!

Updated – 2/4/2015
Fixed backwards compatibility with 10.1
Added exception handling for custom/undefined coordinate system, and Layout view.

 

Download the Bing and Google Maps Python Add-in for ArcMap - Works with ArcGIS 10.1+

 

BingGoogleMapsMain.png

 

The Bing and Google Maps Python Add-in allows you to click a location in ArcMap, and then your browser will open to that location in one of the Bing or Google Map styles.

 

If the toolbar didn’t automatically add to ArcMap, go to Customize –> Toolbars –> and click on Bing and Google Maps.

 

BingGoogleMaps.png

 

The included map styles are:

Google Street View

Google Maps

Google Satellite

Google Terrain

Bing Roads

Bing Bird’s Eye

Bing Aerial

 

I attempt to match the extent of the display in ArcMap to the extent shown in Bing or Google Maps.

 

I’ve recently found out the add-in will not work in Layout view, so I’ve added a warning message to alert the user. I’ve also added a warning message when the Data Frame coordinate system is either undefined, or uses a custom coordinate system.

 

Check out the following guide to add or remove a button, or add a keyboard shortcut for a button:
Tutorial On Customizing ArcMap Toolbars and Keyboard Shortcuts

 

I hope you find this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!

Updated – 2/4/2015
Fixed backwards compatibility with 10.1
Added exception handling for custom/undefined coordinate system, and Layout view.

 

Download the Google Street View Python Add-in for ArcMap - Works with ArcGIS 10.1+

 

StreetViewMain2.png

 

I work for an electric utility, and Google Street View is a very handy tool to do a quick “field check” to verify, for example, equipment or pole specifications. It can save a lot of time, and gas! Of course, the Street View data may not always accurately depict what’s in the real world since things change, but it’s still a very good source to have available.

 

To use this Google Street View Python Add-in, first download the add-in by clicking the link at the top of this page. Next, install the add-in. This should add the following toolbar to ArcMap.

StreetView

If it didn’t automatically add the toolbar, in ArcMap go to Customize –> Toolbars –> and click on Street View.

 

CustomizeToolbars

 

Once the toolbar is visible, click on the Street View icon, and then using either satellite imagery, or some other landbase data click on a road. Once a road is clicked, your browser will open and show that location within Google Street View. If the screen that loads is black, then there is no Street View data available for that location.

 

I’ve recently found out the add-in will not work in Layout view, so I’ve added a warning message to alert the user. I’ve also added a warning message when the Data Frame coordinate system is either undefined, or uses a custom coordinate system.

 

Check out the following guide to add or remove a button, or add a keyboard shortcut for a button:
Tutorial On Customizing ArcMap Toolbars and Keyboard Shortcuts

 

I hope you find this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!

Updated – 2/27/2015
Fixed compatibility with Python 3 for ArcGIS Pro

 

Download the Generate Random Points Toolbox – works with ArcGIS 10.1+


Maybe you’re doing a soil analysis study (check out my Create Custom Grid tool) and need random locations for each sample? Or you’re doing a tree diversity study and need random locations where the number of tree species will be identified? Or maybe you’re just looking for an adventure and want to visit each random location created from a polygon around a city neighborhood? Who knows…

 

The Generate Random Points tool generates a number of random points inside each polygon of an input Polygon feature class. The number of random points can be a fixed number or based on a field.

 

An optional parameter can be set to define a minimum distance between the random points. There is also a parameter called Maximum Attempts, which is the maximum attempts the tool will make before failure. Depending on the number of random points and the minimum distance, there might not be a possible solution so the tool would run indefinitely.

 

If the maximum attempts for a polygon is reached, there are 3 choices on how to handle:

 

NO – The tool will fail and no random points will be generated.
KEEP_ALL – All generated random points will be returned. If one polygon could only generate 20 out of 100 random points, the 20 points will be included in the output.

KEEP_ONLY_SUCCESSFUL – Only polygons that succesfully generated all the required random points will have the random points included in the output.

 

The output Point feature class will contain a field called PolygonOID, which states the OID of the Polygon that each point was generated from.

 

Be sure to view the Tool Help within the tool dialog box for detailed instructions. Also, check the Geoprocessing Results for any error messages.

 

A similar ESRI tool called Create Random Points requires ArcInfo (Advanced) licensing. This tool only requires ArcGIS 10.1 or later at any licensing level.

 

Here’s a screenshot of the parameters:

 

GenerateRandomPoints-params.png

 

Here’s an example of generating 20 random points:

 

GenerateRandomPoints.png

 

Here’s an example of generating 20 random points with a minimum distance of 200 feet:

 

GenerateRandomPointsMinDistance.png

 

I hope someone can find this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!

Updated – 4/10/2015
Can now shorten the polylines from both sides, this keeps the middle part of the polyline

 

Previous Updates

Fixed compatibility with Python 3 for ArcGIS Pro

Output polylines now retain original vertices, whereas before the features were simplified into straight lines

 

Download the Shorten Polylines Toolbox – works with ArcGIS 10.2+

 

The Shorten Polylines tool takes an input polyline feature class and shortens each polyline feature based on a specified distance or percentage value. The value can either be fixed or field based.

 

You can now shorten the lines based on either the beginning, end, or both sides as shown in the screenshot below. If BOTH is chosen, then the middle portion of the polyline is kept. Also, if BOTH is chosen the distance or percentage value is divided by two.

 

The output polyline feature class containing the shortened polylines will have a field called LineOID which states the OID of the original polyline it was created from. This allows any attribute information to be joined back to the new polylines. It will also contain a field called Value, which states the value that was used to create the line.

 

If a field is being used to assign the value, any features with null values will be skipped. If the polylines are being shortened using a PERCENTAGE, the value must be in decimal format and between 0 and 1.0. All features with values outside this range will be skipped. If the polylines are being shortened using a DISTANCE, the value must be positive. All features with negative numbers will be skipped.

 

Be sure to view the Tool Help within the tool dialog box for detailed instructions. Also, check the Geoprocessing Results for any error messages.

 

Here’s a screenshot of the parameters:

 

ShortenLinesParameters.png

 

I hope someone finds this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!

Updated – 4/10/2015
Added the capability to create the points starting at either the beginning, or end of the line

 

Previous Updates
Fixed compatibility with Python 3 for ArcGIS Pro

 

Download the Create Points on Lines Toolbox – works with ArcGIS 10.1+

 

The Create Points on Lines tool creates points on lines at a specified distance, interval, or percentage value. The value can be fixed or field based. There is also an option to add the starting point, end point, or both to the output Point feature class.

 

You can now choose the Starting Location. So, if you want a point created 10 feet from the end of the line, change the Starting Location parameter to END.

 

If DISTANCE is chosen, a single point will be created at the specified distance.
If INTERVAL is chosen, points will be created along the line at the specified interval.
If PERCENTAGE is chosen, a single point will be created at the specified percentage.

 

The value used to create the points can be entered as a parameter, or a field can be selected.  The output Point feature class contains a field called LineOID, which is the OID of the line the point was created from. This allows data to be joined back to the point. There is also a field called Value, which contains the value that was used to create the point.

 

Be sure to view the Tool Help within the tool dialog box for detailed instructions. Also, check the Geoprocessing Results for any error messages.

 

Here’s a screenshot of the parameters:

CreatePointsLinesParameters.png

 

I hope someone finds this tool useful. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I've created!