I know it's probably the opposite of what would generally be desirable, but I am trying to temporarily copy a Feature Class from a File GDB with Domains into a
in_memory intermediate FC without maintaining the source Domains.
I cannot prove this because I don't know how (where) to look for the in-memory FC I produce, but when I do
temp_folder = r'in_memory' arcpy.arcpy.CopyFeatures_management(fc, os.path.join(temp_folder, 'temp'))
,I think I not only copy the entire source FC into the
in_memory workspace, but also the source FileGDB's Domains.
Can someone confirm this behaviour? Is there a way to avoid this using the same tool (
CopyFeatures_management) or (only if it's not possible) a similar tool?
I would like to keep using
in_memory for my intermediate file, rather than create physical intermediate files because:
- I would have to delete them
- I would have to properly check for errors within my script, handle them in order to delete intermediate files before they reach the 'delete' part of the script
in_memoryis faster because it uses RAM (is this true?)
I tried deleting the domains, but the code below seems to make ArcGIS crash all the time (imagine
domains comes from something like
for d in domains: arcpy.DeleteDomain_management(temp_folder, d)