码迷,mamicode.com
首页 > 其他好文 > 详细

arcgis AE删除SDE featureClass数据

时间:2016-09-08 18:13:27      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:

//删除SDE图层
        public static bool DeleteSDELayer(ESRI.ArcGIS.Geodatabase.IWorkspace m_pWorkspace, string SDEDSname )
        {
            try
            {
                ESRI.ArcGIS.Geodatabase.IEnumDatasetName pEnumDsName = m_pWorkspace.get_DatasetNames(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTFeatureClass);
                pEnumDsName.Reset();
                ESRI.ArcGIS.Geodatabase.IDatasetName pSDEDSname = pEnumDsName.Next();
                while (pSDEDSname != null)
                {
                    
                        if (pSDEDSname.Name.ToUpper().EndsWith(SDEDSname.ToUpper()))
                        {
                            break;
                        }
                    }
                    pSDEDSname = pEnumDsName.Next();
                }
                if (pSDEDSname != null)
                {
                    ESRI.ArcGIS.Geodatabase.IFeatureWorkspace pFWS = m_pWorkspace as ESRI.ArcGIS.Geodatabase.IFeatureWorkspace;
                    ESRI.ArcGIS.Geodatabase.IFeatureWorkspaceManage pFWSM;
                    pFWSM = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspaceManage)pFWS;
                    pFWSM.DeleteByName(pSDEDSname);
                }
            }
            catch (Exception ex)
            {
                return false;
            }
            return true;
        }

arcgis AE删除SDE featureClass数据

标签:

原文地址:http://www.cnblogs.com/6xiaoxian9/p/5853723.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!