Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script that tries to read from the arc environment using

import arcpy
tolerance = arcpy.env.XYTolerance

as recommended here:

Alas tolerance always ends up as None. Even when I set it explicity in the Environments... part of the script dialog box.

Is this a bug?

share|improve this question

I have loaded up arcmap and using the built in python interpreter I ran through the commands outlined in the helpfiles you linked. It seems that the syntax is very precise, but I was able to set the tolerance and then retrieve it as a variable called tolerance using the following steps:

>>> import arcpy
>>> from arcpy import env
>>> env.workspace = 'C:\\shapefiles\\final'
>>> env.XYTolerance = 2.5
>>> tolerance = env.XYTolerance
>>> print tolerance
2.5 Unknown
share|improve this answer
Ok... but how to retrieve XYTolerance from the script dialog box? Which workspace does that live in? – Sideshow Bob Oct 17 '12 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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