When I use the the Editor Start Editing toolbar item, a dialog with information, warning and error appears before the edit session is started: Image from the start editing dialog

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)

  • Please expand on your "own error" – Midavalo Jul 5 '16 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. – scher Jul 6 '16 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. – Propper Jul 6 '16 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. – scher Jul 6 '16 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. – scher Jul 6 '16 at 7:07

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

|improve this answer|||||
  • 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. – scher Jul 6 '16 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.

|improve this answer|||||
  • 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. – scher Jul 6 '16 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. – Rich Wawrzonek Jul 6 '16 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.