
Еще вопросик, пытаюсь использовать "point_along_polyline.cal" не могу понять почему все время ошибка "Не найдено имя поля или не сбалансированы кавычки.":
Dim pFeatcls As IFeatureClass
Dim pFeatLayer As IFeatureLayer
Dim pSubtypes As ISubtypes
Dim iLayerOrder As Integer
Dim pFCursor As IFeatureCursor
Dim pFBuffer As IFeatureBuffer
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pCurve As ICurve
Dim pPoint As IPoint
Dim dDistance As Double
Dim bAsRatio As Boolean
'=======================
'adjust the values below
dDistance = 0.5 ' the distance will be from a field
bAsRatio = False 'real distances will be used
iLayerOrder = 4 'the first layer in the TOC
'dDistance = [Distance]
'=======================
Set pMxDoc = ThisDocument
Set pMap = pMxDoc.FocusMap
Set pFeatLayer = pMap.Layer(iLayerOrder)
Set pFeatcls = pFeatLayer.FeatureClass
Set pFBuffer = pFeatcls.CreateFeatureBuffer
Set pFCursor = pFeatcls.Insert(True)
If (Not IsNull([Shape])) Then
Set pCurve = [Shape]
If (Not pCurve.IsEmpty) Then
pCurve.Project pMap.SpatialReference
Set pPoint = New Point
pCurve.QueryPoint 0, dDistance, bAsRatio, pPoint
Set pFBuffer.Shape = pPoint
pFCursor.InsertFeature pFBuffer
End If
End If