I've read some articles about translating map units into page units for getting distances in an MXD. I have not seen a post about how to get the page units programmatically from ArcPy. Is it possible to in any version of ArcMap 10.x to get the page units programmatically? DisplayUnits and mapUnits from dataframe do not suffice.

Edit: This post only answers how to translate units between map and page units. It does not answer how to retrieve with arcpy page units (cm, in, etc.).
I am not looking for the answer to how to translate units from map distance to page distance and back. I am simply asking about how to retrieve page units.

  • 2
    I don't think what you are requesting is possible. The same MXD applies to multiple "pages", so choosing one value would be wrong. Besides, distances are a property of the CRS (coordinate reference system) – Vince Jun 19 '18 at 13:27
  • What articles have you read about this? I think it can be done if you base the link on one data frame even if there are many and that there is already a Q&A here about it. – PolyGeo Jun 19 '18 at 20:26

This is not available in 10.x using arcpy. It can only be set within ArcGIS Desktop application and not using arcpy.

The documentation states:

Page units can only be changed in the ArcMap via Customize > ArcMap Options > Layout View Tab

However, they have added the read/write property pageUnits in arcpy for ArcGIS Pro.

The documentation explains:

A layout's page units. Below is a list of valid strings when setting the page units.

  • CENTIMETER —Centimeter
  • INCH —Inch
  • MILLIMETER —Millimeter
  • POINT —Point

There is likely a way to access the information you need using ArcObjects. You can access ArcObjects using python. Have a look at Accessing ArcObjects from Python for instructions.

  • I have read this: Page units can only be changed in the ArcMap via Customize > ArcMap Options > Layout View Tab. This documentation note is vague since it is only saying it can be changed but not reference as to whether it can just be access. I guess to achieve this, I either need to jump to ArcGIS Pro or write custom code in ArcObjects. Thanks for your response. – theCrux Jun 21 '18 at 14:04
  • If this answer helps you, please accept it. – Fezter Jun 21 '18 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.