Sub CogoInverse() Dim pMxDoc As IMxDocument Dim pMap As IMap Dim pFeatureLayer As IFeatureLayer Dim pInFeatureClass As IFeatureClass Dim pOutFeatureClass As IFeatureClass Set pMxDoc = ThisDocument Set pMap = pMxDoc.FocusMap Set pFeatureLayer = pMxDoc.SelectedLayer Set pInFeatureClass = pFeatureLayer.FeatureClass '======================================================================= Dim ET As New ETGW_Core Dim sOutFileName As String Dim bCoords As Boolean Dim bZattrib As Boolean Dim sDirType As String Dim sDirUnits As String Dim lLinPrec As Long Dim lAngPrec As Long bCoords = True 'the start and end coordinates of the segments will be recorded bZattrib = True 'if Z/M shape the Z/M values will be recorded sDirType = "QuadrantBearing" 'output angle type sDirUnits = "DMS" 'output angle units - Degrees Minutes Seconds lLinPrec = 2 lAngPrec = 1 sOutFileName = "c:\00\cogo_inverse.shp" Set pOutFeatureClass = ET.CogoInverse(pInFeatureClass, sOutFileName, _ bCoords, bZattrib, sDirType, sDirUnits, lLinPrec, lAngPrec) '======================================================================== If Not pOutFeatureClass Is Nothing Then Set pFeatureLayer = New FeatureLayer Set pFeatureLayer.FeatureClass = pOutFeatureClass pFeatureLayer.Name = pOutFeatureClass.AliasName pMap.AddLayer pFeatureLayer End If End Sub