If it were me, I would change the SetZValueOnPoint into a Function that returns an IPoint. In your main procedure you can create a new point and update the point collection. Finally you'll need to set the feature shape back to the modified point collection and store the feature. Hope that helpsPublic Function SetZValueOnPoint(ByVal point As IPoint, ByVal zValue As Double) As IPoint Dim zAware As IZAware Set zAware = point zAware.zAware = True point.Z = zValue Return point End Function ''inside main procedure: For lPnt = 0 To (pPointCollection.PointCount - 1) Dim newPoint As IPoint = SetZValueOnPoint(pPointCollection.point(lPnt), Convert.ToDouble(txtZValue.Text)) pPointCollection.UpdatePoint lPnt, newPoint Next '' Set pFeature.Shape = pPointCollection pFeature.Store '' id = pEnumID.Next
Hi Jeff,
Many thanks for looking at this!Please see the procedure code:
Public Sub SetZValueOnPoint(ByVal point As ESRI.ArcGIS.Geometry.IPoint, ByVal zValue As System.Double) If point Is Nothing OrElse point.IsEmpty Then Return End If Dim zAware As ESRI.ArcGIS.Geometry.IZAware = CType(point, ESRI.ArcGIS.Geometry.IZAware) ' Explicit Cast zAware.ZAware = True point.Z = zValue End Sub