' Copyright 2008 ESRI'' All rights reserved under the copyright laws of the United States' and applicable international laws, treaties, and conventions.'' You may freely redistribute and use this sample code, with or' without modification, provided you include the original copyright' notice and use restrictions.'' See use restrictions at <your ArcGIS install location>/developerkit/userestrictions.txt.'Option Explicit'This class module returns the number of Edfe features whihc are connected to a Simple Junction Feature'Unlike the EdgeFEatureCount method, it does not count the elements in a Complex Edge which are connected'to a simple junction featurePublic FunctionEdgeFeatCount(pSJFAsISimpleJunctionFeature)As Long DimpRow1AsesriGeoDatabase.IRowDimpRow2AsesriGeoDatabase.IRowDimlNewCountAs Long DimlOldCountAs Long Dimi, jAs IntegerlOldCount = pSJF.EdgeFeatureCount lNewCount = lOldCount'Cycle through the set of connected edges and determine if any are elements of the same featureFori = 0TolOldCount - 2Forj = i + 1TolOldCount - 1SetpRow1 = pSJF.EdgeFeature(i)SetpRow2 = pSJF.EdgeFeature(j)IfpRow1.OID = pRow2.OIDThenlNewCount = lNewCount - 1Next NextEdgeFeatCount = lNewCountEnd Function