Question: At our organization users generally want a scale bar which is constant size and a useful size, like 1″ or 2″ wide. So that when the map scale changes, the scale bar size remains the same and the division values change. Now the key is to set this up in the template and forget about it. I have seen some responses to this question from ESRI staff which basically say you can do this but you will have to adjust your scale bar properties each time you change the scale. This is not a very useful solution. Why require the cartographer to be constantly vigilant about the scale bar? This should just work automatically, in my opinion. In the past we have solved this problem by creating a 1″ graphic of a scale bar and aligning this with a scale text element. This works but limits you to a 1″ long scale bar. We would prefer on some maps to have a 2 or 3 inch scale bar. So, can this be done with ESRI software? Thanks.
Answer: You can do this using a custom script. Here is a link to something similar that you can start with and then modify:
http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=FFBB051B-1422-2418-88A0-9DD853478BA3 (this link provides a script that moves a data frame. It may provide a framework to help write a script that moves the scale bar on and off the page)
This link provides information aboutmap surround elements which a scale bar is:http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/MapsurroundElement/00s300000035000000/
However, you might want to think about this problem a little differently. There are really two parts to this question. Having a scale bar remain a constant size, and having it remain a useful size. Let’s look at it remaining a constant size first.
First, size the scale bar to the dimensions you like then right click the scale bar and open the properties. In the Scale and Units tab there is an option that reads When Resizing… You want to set this to Adjust Division Value. This will keep the scale bar very close to the size you established even when you change scales.
Second, to keep the scale bar a useful size you could try enabling Data Driven Pages. On the Data Driven Pages toolbar click the first button to access the Data Driven Pages Setup. Next click the Extent tab where you will see an option to round the scale called Round Scale to Nearest. You can type in a value here; for example, if you type “1000″ the scale will be rounded to the nearest 1000. This functionality will round the scale and the scale bar should show more useable divisions.
If some maps actually have different requirements for the scale bar you could try creating a python script with Arcpy that will move the appropriate scale bar onto the appropriate page. Again this would be a Data Driven Pages solution. You would make a 1 inch scale bar and a 2 inch scale bar. Place the 2 inch scale bar off the page. When printing to PDF the script would ascertain the scale of the map and then swap the scale bars if required. This solution requires some scripting.
Formerly a Mapping Center Ask a Cartographer Q & A.