Start Editing Encountered One or More Layers With Errors or Warnings and Cannot Continue
When I use the the Editor Start Editing toolbar item, a dialog with information, warning and error appears before the edit session is started:
Is it possible to insert programatically my own error in the dialog, so that it is shown and prevents he user to start the edit session? (Description)
Propper
611 5 silver badges 19 bronze badges
asked Jul 5, 2016 at 12:06
scherscher
307 1 silver badge 8 bronze badges
5
2 Answers 2
You can't add you own message to this dialog but you can create an event listener to watch for the start editing event to fire. When this event occurs you can then run some code and display your own message dialog.
There are several ways to implement the event listener. One way would be to create a custom extension that tracks events when it is turned on.
Working with editing events
answered Jul 5, 2016 at 22:38
1
-
Thanks for your response. I already tried to listen to the start editing event. The problem is, that the edit session is already started when the event occurs. This is too late for me, because I have to add a field to a feature class and this is just possible outside of an edit session.
Jul 6, 2016 at 4:45
I would develop an ArcMap extension with your own toolbar. Generate two buttons for start editing and stop editing. Additionaly you can integrate any ESRI standard tool very easyly. After clicking "start my edit session" you can add your field, make all necessary checks and then start the edit session. The end user of your product now should use only your toolbar (for starting and stopping edit sessions) and should forget the standard ESRI toolbar. This approach would additionaly help you with your other post here concerning the event handling of edit session.
answered Jul 6, 2016 at 9:48
PropperPropper
611 5 silver badges 19 bronze badges
2
-
We have already implemented such an extension and do it right the way you describe it. Anyway it would be a great success to prevent the user from using the standard ESRI toolbar. There are always some researchers out there that explore the toolbars and use the "wrong" functions.
Jul 6, 2016 at 10:07
-
It sounds like you have a user problem if you have an editing workflow that they refuse to follow. You could do more programming to limit their actions but it seems easier to train the users. Some alternatives are to create an ArcEngine app with a specific editing purpose or use the ICustomizationFilter interface to lock down some built-in functionality of ArcMap.
Jul 6, 2016 at 17:38
Source: https://gis.stackexchange.com/questions/200994/arcobjects-is-there-a-way-to-insert-an-error-into-the-start-editing-dialog
Please expand on your "own error"
Jul 5, 2016 at 18:04
I have to check some conditions prior to starting the edit session. If these conditions are not complied, the user is not allowed to start an edit session. Inserting an error in the given dialog would do this job.
Jul 6, 2016 at 4:49
Is there a specific reason why you can't keep the additional field at the feature class? As workaround: What about checking if the field exists in the start editing event. If so, stop editing again, adding the field and start editing again.
Jul 6, 2016 at 7:01
I already tried to stop the edit session, add the field and start the edit session again. This does not work. I think the reason is, that stopping the edit session in the start editing event is confusing the system.
Jul 6, 2016 at 7:06
The additional field contains information about data in another context and I have to ensure that the field exists. If it does not exist, the other context cannot work properly.
Jul 6, 2016 at 7:07