5

I work with ArcGIS 10.3 (Python 2.7.8) and I need to change the grid interval in 70 MXD's.

I tried to find Python code that can do it. Currently, the interval in each MXD is 200 meters and I need to change it to 750 meters.

enter image description here

1
  • From the answer below if looks like it is not possible with arcpy. This sort of thing can done be with arcobjects, here is one interface that gives you access to such properties.
    – Hornbydd
    Dec 28, 2015 at 0:56

2 Answers 2

3

You are encountering the same software limitation that is described at Altering graticule intervals logically in varying map scales using ArcPy and/or Data Driven Pages? in a different context.

I recommend that you upvote the ArcGIS Idea that Reference grids/graticules should be accessible to arcpy.mapping.

ArcGIS 10.4 Pre-release for Desktop and ArcGIS Pro 1.2 Beta have very recently been announced as available so I plan to check both arcpy.mapping and arcpy.mp for this functionality.

If it is not available in ArcGIS Pro we will need to create a separate ArcGIS Idea for that. I think there is a much better chance of this being addressed in ArcGIS Pro than in the ArcGIS 10.x architecture.

1

I use a simple, free macro recorder called Tinytask to help automate things not scriptable in arcpy. Tinytask records keyboard and mouse input that you can play back. There is no install, just download tinytask.exe from vTaskStudio.com and run. I am not affiliated with this software, just a happy customer.

4
  • sorry, i didn't understood your answer- how it relate to my question?
    – newGIS
    Feb 16, 2016 at 14:52
  • there is no way to to change the grid interval with scripting, that's why I recommended a macro tool, which can change the grid settings for multiple layers.
    – klewis
    Feb 16, 2016 at 18:51
  • i download it, but how to use in in the arcmap?
    – newGIS
    Feb 17, 2016 at 6:41
  • 1
    make a copy of an mxd for testing. Open arcmap, open the mxd. run tinytask, click the blue circle to start recording. press Home button to select DataFrame press F12 to open Data Frame properties make your changes to grid tab,etc save mxd click the red circle to stop recording. You can save the recording. open a new mxd, press run on tinytask repeat for each mxd
    – klewis
    Feb 17, 2016 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.