arcengine 删除物理图层

//删除数据图层 by [email protected] function deleteTable(FWorkspace: IWorkspace; DataName: string): boolean; var PEnumDataset : IEnumDataset; pDataset : IDataSet; wname : widestring; DType : ToleEnum; PCEnumDataset : IEnumDataset; //coverage有子 PCDataset : IDataSet; begin FWorkspace.Get_Datasets(esriDTAny, PEnumDataset); PEnumDataset.Next(pDataset); DataName := UpperCase(DataName); while pDataset <> nil do begin pDataset.Get_Name(wname); pDataset.Get_Type_(DType); if DType = esriDTFeatureDataset then //coverage目录 begin pDataset.Get_Subsets(PCEnumDataset); PCEnumDataset.Next(PCDataset); while PCDataset <> nil do begin PCDataset.Get_Name(wname); if DataName = UpperCase(wname) then begin PCDataset.Delete; result := True; Exit; end; PCEnumDataset.Next(PCDataset); end; end else begin if DataName = UpperCase(wname) then begin pDataset.Delete; result := True; Exit; end; end; PEnumDataset.Next(pDataset); end; result := False; end;

你可能感兴趣的:(delphi)