//レイヤからFeatureClassNameオブジェクトを取得 IMap pMap = ArcMap.Document.FocusMap; IFeatureLayer pFeatureLayer = (IFeatureLayer)pMap.get_Layer(0); IDisplayTable pDisplayTable = (IDisplayTable)pFeatureLayer; IDataset pDataset = (IDataset)pDisplayTable.DisplayTable; IDatasetName inputDatasetName = (IDatasetName)pDataset.FullName; //出力ワークスペースネームの作成 IWorkspaceName outputWorkspaceName = new WorkspaceNameClass(); outputWorkspaceName.WorkspaceFactoryProgID = "esriDataSourcesFile.ShapefileWorkspaceFactory"; //シェープファイルの場合 outputWorkspaceName.PathName = @"C:\Temp\"; //出力フィーチャクラスネームの作成 IFeatureClassName outputFeatureClassName = new FeatureClassNameClass(); IDatasetName outputDatasetName = (IDatasetName)outputFeatureClassName; outputFeatureClassName.FeatureType =esriFeatureType.esriFTSimple; outputFeatureClassName.ShapeType = pFeatureLayer.FeatureClass.ShapeType; outputFeatureClassName.ShapeFieldName = "Shape"; outputDatasetName.WorkspaceName = outputWorkspaceName; outputDatasetName.Name = "Output3"; //出力フィーチャクラス名 ////フィーチャクラスのコンバート //IFeatureDataConverter pFeatureDataConverter = new FeatureDataConverterClass(); //pFeatureDataConverter.ConvertFeatureClass(inputDatasetName, null, null, outputFeatureClassName, null, null, "", 1000, 0); ////フィーチャクラスのコンバート IExportOperation pExportOperation = new ExportOperationClass(); pExportOperation.ExportFeatureClass(inputDatasetName, null, null, null, outputFeatureClassName, 0);
テーブル結合したテーブルをエクスポート
2016/9/1 (木)