I'm currently doing the following operation in an app in C#:
1- Do a geoprocessing SelectLayerByAttribute on a layer x
2- Do a geoprocessing CopyFeatures of that layer x and the output ends up in an FGDB
I did expect that the result would contain only the selected items in the layer x, but that's not the case. The whole content of the layer x is copied. The CopyFeatures does not seem to take into account that some elements are selected even though the documentation says so.
Just to be sure, I did a MakeFeatureLayer with the same query and then I did the CopyFeatures and it worked. So the problem does not come from the query itself.
Anybody seen that problem?
Solved! Go to Solution.
Hi,
I use Select . It covers both: SelectLayerByAttribute and CopyFeatures.
Hi,
I use Select . It covers both: SelectLayerByAttribute and CopyFeatures.
Thanks, it will work with that solution.
I also have a SelectLayerByLocation followed by a CopyFeatures that does not take into account the result of the selection. So I guess that there is still a problem with that one.
There is no reason to use SelectLayerByAttribute or SelectLayerByLocation from geoprocessing. You can select layer features directly using FeatureLayer method Select .