# Name: createlayerfromselectedfeatures.py # Description: creates a new layer based on a query. # Author: RFurlong import arcpy from arcpy import env arcpy.overwriteOutput = true try: # Make a layer from the feature class arcpy.MakeFeatureLayer_management("C:/data/test.gdb/blockgroups_lyr") # Write the selected features to a new layer arcpy.CopyFeatures_management("blockgroups", "c:/data/test.gdb/blockgroups")
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.