disable m and z values

5786
1
08-29-2013 06:49 AM
jonathantuscanes
New Contributor II
I am working in on a geoprocessing python script (10.0).  My issues is the following error:

ExecuteError: ERROR 999999: Error executing function.
Invalid Topology [M coord limit exceeded.]

I am aware on how to disable m and z values in ArcGIS GUI, in the 'Environment Settings'.  However, I can't figure out how to do this in a python script.  I tried this and it did not work:

arcpy.env.outputZFlag = "Disabled"
arcpy.env.outputMFlag = "Disabled"

I am also aware that converting the FC to a shapefile will strip any m and z values....but I would like to continue my work inside a FGDB.  Hopefully I am missing something obvious.
Tags (2)
1 Reply
StacyRendall1
Occasional Contributor III
Setting the value works for me. You could try printing the values before and after your assignment to confirm this:

arcpy.AddMessage(Z: ' + arcpy.env.outputZFlag)
arcpy.env.outputZFlag = "Disabled"
arcpy.AddMessage(Z: ' + arcpy.env.outputZFlag)

arcpy.AddMessage('M: ' + arcpy.env.outputMFlag)
arcpy.env.outputMFlag = "Disabled"
arcpy.AddMessage('M: ' + arcpy.env.outputMFlag)


It may be that the variable is being set, but some tool later on is not honoring the setting.
0 Kudos