I have a problem in using the
in_memory function in a Python-script.
I have a shapefile
test.shp with 3 fields (Alter, Geschlecht, Anzahl) and 2 rows of data. When I am using
arcpy.CopyFeatures_management to copy the shapefile to
in_memory it deletes the data of the rows.
I wrote a little test-script:
import arcpy arcpy.env.workspace = "C:\\Python\\" arcpy.CopyFeatures_management("test.shp","in_memory/test") arcpy.CopyFeatures_management("in_memory/test", "test1.shp") arcpy.CopyFeatures_management("test.shp","test2.shp")
You can download the shapefiles here: https://www.dropbox.com/sh/b47og9rjfevpi7v/AAB_YLz1l_eY3b-lFJPm9kP9a?dl=0
test1.shp is empty (rows are still here but without data) and
test2.shp is an correct copy.
Can someone tell me what is going wrong?