//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) ); } } }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.