I am trying to develop arcgis 10.0 addin to update Z values of vertices of a selected line. Scenario: The tool scans all features in a given shape file and populates the list of features which has at least one vertex with a Z vlaue = 0. User then selects a feature from the list and clicks a button to update Z values to a given height - this last part does not work.
I have tried the following for updating Z values of a selected polyline feature with no luck:
Dim pFeatureSelection As IFeatureSelection pFeatureSelection = pFLayer Dim pEnumID As IEnumIDs pEnumID = pFeatureSelection.SelectionSet.IDs Dim id As Long id = pEnumID.Next Dim pPointCollection As IPointCollection Dim pFeature As IFeature Do While Not id = -1 pFeature = pFLayer.FeatureClass.GetFeature(id) pPointCollection = pFeature.Shape For lPnt = 0 To (pPointCollection.PointCount - 1) SetZValueOnPoint(pPointCollection.Point(lPnt), Convert.ToDouble(txtZValue.Text)) Next id = pEnumID.Next Loop
Please your help in providing any hint or suggesting error in the code above is much appreciated!
many thanks meryloo