2

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

import arcpy
tolerance = arcpy.env.XYTolerance

as recommended here: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000w000000

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?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Oct 12, 2012 at 13:27

1 Answer 1

2

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
>>> 
answered Oct 12, 2012 at 13:51
1
  • Ok... but how to retrieve XYTolerance from the script dialog box? Which workspace does that live in? Commented Oct 17, 2012 at 14:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.