Светлана,
1. В ArcCatalog-е создайте новый шейп-файл с Feature TRype = Polyline
2. Стартуйте ArcMap, добавьте этот шейп как слой № 0,
3. Создайте новый UIButtonControl и в процедуру UIButtonControl1_Click вставьте вызов процедуры LineCreate, текст которой следует ниже:
Private Sub LineCreate()
Dim pApp As IApplication
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pFLayer As IFeatureLayer
Dim pFClass As IFeatureClass
Dim pDataSet As IDataset
Dim pFeature As IFeature
Dim pLine As ILine
Dim pEditor As IEditor
Dim pID As New UID
Dim pFromPoint As IPoint
Dim pToPoint As IPoint
Dim iLoop As Integer
Dim pSegColl As ISegmentCollection
Set pApp = Application
Set pMxDoc = ThisDocument
Set pMap = pMxDoc.FocusMap
pID = "esriCore.Editor"
Set pEditor = pApp.FindExtensionByCLSID(pID)
' Get the first layer we want to edit:
Set pFLayer = pMap.Layer(0)
Set pFClass = pFLayer.FeatureClass
Set pDataSet = pFClass
pEditor.StartEditing pDataSet.Workspace
Set pFeature = pFClass.CreateFeature
Set pLine = New esriCore.Line
Set pFromPoint = New Point
Set pToPoint = New Point
pFromPoint.PutCoords 2798250, 654850
pToPoint.PutCoords 2801850, 656150
pLine.PutCoords pFromPoint, pToPoint
Set pSegColl = New Polyline
pSegColl.AddSegment pLine
Set pFeature.Shape = pSegColl
'--------------------------------------------
pEditor.StartOperation
pFeature.Store
pEditor.StopOperation "AddLineFeature"
pEditor.StopEditing True
pMxDoc.ActiveView.Refresh
End Sub