AnsweredAssumed Answered

What is causing my ArcGIS Pro to crash when running this Python code through the Python Window in ArcPro?

Question asked by Curtis.overholt@riotinto.com on Dec 10, 2019
Latest reply on Dec 10, 2019 by jborgion

a

arcpy.management.SelectLayerByAttribute("(SHAPE_IN_CONTENTS)", "NEW_SELECTION", "LEASE_NAME LIKE 'ABC%'", None)



arcpy.management.CopyFeatures("(SHAPE_IN_CONTENTS)", r"C:\Data\GIS\Project\Python\Python.gdb\(SELECTED_SHAPE)", None, None, None, None)



arcpy.management.Dissolve("(SELECTED_SHAPE", r"C:\Data\GIS\Project\Python\Python.gdb\(SELECTED_SHAPE_DISSOLVE)", None, None, "MULTI_PART", "DISSOLVE_LINES")

Shapefile name is within ( ) 

 

I can run each line separately. I can run 2-3 separately. Occasionally 1-3 work, 1-2 work, 2-3 works 100% of the time.

 

I'm wondering if I need to add code between line 2-3 to reference the file?

 

 

When I try to run the entire code, the trailling dots freeze and windows says ArcGIS Pro has stopped working

Outcomes