Editing not enabled

67
3
Jump to solution
10-23-2020 04:41 AM
Highlighted
New Contributor III

Good morning!

I'm building a plugin for ArcGis Pro that performs several editions over a File GeoDatabase.The first step are populate several of the feature classes and tables inside that File GeoDatabase. I have zero issues with it, but the person who will use it keeps getting this error:

I have no idea why the "Editing in the application is not enabled" is happening. That error message appears when a non-geometric table is written (the last step). Before that, several features classes are updated the same way without any problem.

I use the same code for every insert method, so I don't understand why the last method is giving that error to that person and it is working fine on my side.

  Public Async Function storeMetadata(metadatos As METADATOS, gdbPath As String) As Task(Of Boolean)
Dim message As String = String.Empty
Dim creationResult As Boolean = False
Await QueuedTask.Run(Function()

Using geodatabase As Geodatabase = New Geodatabase(New FileGeodatabaseConnectionPath(New Uri(gdbPath)))

Using gca_metadatos As Table = geodatabase.OpenDataset(Of Table)("GCA_Metadatos")
Dim editOperation As EditOperation = New EditOperation()

Try

editOperation.Callback(Function(context)
Using rowBuffer As RowBuffer = gca_metadatos.CreateRowBuffer()
rowBuffer("IDTRANSACCION") = metadatos.IDTRANSACCION

'More fields here
Using row As Row = gca_metadatos.CreateRow(rowBuffer)

context.Invalidate(row)

End Using
End Using
End Function, gca_metadatos)
Catch ex As Exception
MessageBox.Show("Error guardar metadatos (I): " & ex.Message)
End Try

Try
creationResult = editOperation.Execute()
If Not creationResult Then message = editOperation.ErrorMessage
Catch exObj As GeodatabaseException
message = exObj.Message

GCA_Common.Application.EscribirError(GCA_Common.Application.AlmacenarError(exObj))

End Try
End Using
End Using
Return True
End Function)

If Not String.IsNullOrEmpty(message) Then

Return False
Else
Return True
End If
End Function‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Thanks for any help provided!

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

Oscar,

That editoperation error message usually indicates editing has been disabled in the UI, either by the user or via the SDK. Can you check if this is the case, if not we'll have to look into it further. Is the user allowed to interact with the UI before the last table is updated in your app?

The following links describe how editing can be disabled in the UI:

Enable and disable editing—ArcGIS Pro | Documentation 

ProConcepts Editing · Esri/arcgis-pro-sdk Wiki · GitHub 

View solution in original post

3 Replies
Highlighted
Esri Regular Contributor

Oscar,

That editoperation error message usually indicates editing has been disabled in the UI, either by the user or via the SDK. Can you check if this is the case, if not we'll have to look into it further. Is the user allowed to interact with the UI before the last table is updated in your app?

The following links describe how editing can be disabled in the UI:

Enable and disable editing—ArcGIS Pro | Documentation 

ProConcepts Editing · Esri/arcgis-pro-sdk Wiki · GitHub 

View solution in original post

Highlighted
New Contributor III

I will check this. But it would be strange if it is activated for the Feature Classes and not for the Table. The user doesn't interact with th UI during those editions.

Thanks for your input!

Reply
0 Kudos
Highlighted
New Contributor III

Thanks! That solved the problemn. The customer had different Editing options enabled in ArcGIS Pro Settings.

Reply
0 Kudos