//create datareader FeatureDataTable featDataTable = featureLayer.GetDataTable(new QueryFilter()); // creates a new row DataRow newFeatDataRow = featDataTable.NewRow(); newFeatDataRow[featDataTable.GeometryColumnIndex] = newpolyline; //sets the new geometry to the feature layer data table featDataTable.Rows.Add(newFeatDataRow); //now save edits int result = featDataTable.SaveInFeatureLayer(); DataRow[] errors = featDataTable.GetErrors(); for (int i = 0; i < errors.Length; i++) { if ( errors.HasErrors ) { // get the array of columns in error. DataColumn [ ] colArr = errors.GetColumnsInError( ); for ( int j = 0; j < colArr.Length; j++ ) { // insert code to fix errors on each column. MessageBox.Show("Error with creating new flight column " + (colArr.ColumnName) ); } } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.