private void kMLToLayerToolStripMenuItem_Click(object sender, EventArgs e)
{
Geoprocessor pGeoprocessor = new Geoprocessor();
ESRI.ArcGIS.ConversionTools.KMLToLayer pKMLToLayer = new ESRI.ArcGIS.ConversionTools.KMLToLayer();
pKMLToLayer.in_kml_file = @"E:\工作\Data\测试二.kml";
pKMLToLayer.output_layer = "测试二";
pKMLToLayer.output_folder = @"E:\Data\";
//pKMLToLayer.output_data = @"E:\Data\测试二.lyr";
pGeoprocessor.OverwriteOutput = true;
IGeoProcessorResult resultGeo = (IGeoProcessorResult)pGeoprocessor.Execute(pKMLToLayer,null);
if (resultGeo.Status == esriJobStatus.esriJobSucceeded)
MessageBox.Show("执行成功!", "输出Layer", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("执行Error!", "输出Layer", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
{
Geoprocessor pGeoprocessor = new Geoprocessor();
ESRI.ArcGIS.ConversionTools.KMLToLayer pKMLToLayer = new ESRI.ArcGIS.ConversionTools.KMLToLayer();
pKMLToLayer.in_kml_file = @"E:\工作\Data\测试二.kml";
pKMLToLayer.output_layer = "测试二";
pKMLToLayer.output_folder = @"E:\Data\";
//pKMLToLayer.output_data = @"E:\Data\测试二.lyr";
pGeoprocessor.OverwriteOutput = true;
IGeoProcessorResult resultGeo = (IGeoProcessorResult)pGeoprocessor.Execute(pKMLToLayer,null);
if (resultGeo.Status == esriJobStatus.esriJobSucceeded)
MessageBox.Show("执行成功!", "输出Layer", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("执行Error!", "输出Layer", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}