调用方法:
ESRI.ArcGIS.DataManagementTools.CopyFeatures pCopyFeature = null;
Geoprocessor pProcess = null;
pCopyFeature = new ESRI.ArcGIS.DataManagementTools.CopyFeatures();
pCopyFeature.in_features = pSorFeaLyr;
pCopyFeature.out_feature_class = sPath;
pProcess = new Geoprocessor();
try
{
pProcess.Execute(pCopyFeature, null);
return true;
}
catch
{
object sError = null;
pProcess.GetMessages(ref sError);
}
关于参数介绍:
in_features:源要素集。可以是featureclass,也可以是featurelayer;其中,如果源要素集是feature layer且存在选择集要素时,只复制选择集要素。如果源要素集是featureclass或者没有选择集的featurelayer时,复制所有要素。
out_feature_class :目标要素,可以是shp文件路径,也可以是相关的要素集路径,如d:\1.shp或d:\1.mdb\copy.如果导入到mdb或gdb数据库中,请确保存在相应本地数据库。