1

I'm running the command below on a data set with many stacked polygons. This is a county standard so I can't change the way they manage their data. Each type of polygon can be uniquely identified with one of the fields (TaxLot, Block, ROW, etc.)

arcpy.Clip_analysis('parcels', 'clip_sect', parcel_clip3_shp)

It works, but it only returns the top most polygon. However, running it as a geoprocess within ArcMap returns all the polygons. I built the same geoprocessing tool in ModelBuilder and it returned all polygons. I exported the code to *.py and it only returned the top polygon.

I was thinking I could create feature layers for each type with a selection query and then run a function to clip/add but that seems a bit brute force and not very clean.

Any thoughts?

I am using ArcGIS 10.2.1, Python 2.7.3 and Idle 2.7.3.

closed as off-topic by PolyGeo Sep 4 '16 at 7:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Sounds like a bug to me if you are getting different results from within ArcMap compared to the code from outside. When you are running it from within ArcMap, are the input feature classes in the table of contents? – Paul Apr 12 '14 at 5:08
  • I think it is unlikely that this would be happening. If you are still experiencing it would you be able to retest using the latest version of ArcGIS for DEsktop available to you and if you are still seeing it then revise your question with more precise details of what your data looks like, and what you do through the GUI versus via ArcPy, please? – PolyGeo Sep 4 '16 at 7:43