Blog

Delete Geometric Network using ArcObject

Posted by Yogesh Sharma Blogs | ArcObject Nov 16, 2012
Delete Geometric Network using ArcObject.
Delete Geometric Network using ArcObject.

IWorkspaceFactory pwsf = new FileGDBWorkspaceFactoryClass();
            IWorkspace pws = pwsf.OpenFromFile(@"D:\Project\Geometric_network\MWA.gdb", 0);

            IGeodatabaseRelease2 pGeorel = pws as IGeodatabaseRelease2;
            int majVer= pGeorel.MajorVersion;
            int minVer = pGeorel.MinorVersion;
            

            IFeatureWorkspace pFeatWs =(IFeatureWorkspace) pws;
            CreateGeometricNetwork(pFeatWs);
            IEnumDataset pdss= pws.get_Datasets(esriDatasetType.esriDTFeatureDataset);
            IDataset pds =pdss.Next();

            while (pds != null)
            {
                IEnumDataset penumds= pds.Subsets;
                IDataset pds1= penumds.Next();
                while (pds1 != null)
                {
                    if (pds1 is IGeometricNetwork)
                    {
                        pds1.Delete();
                    }
                    pds1 = penumds.Next();
                }



                pds = pdss.Next();
            }
}
COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.