Versioning Settings in Editor Editing Options

3112
10
06-30-2010 12:46 PM
Highlighted
New Contributor
In our Oracle Spatial/SDE enterprise geodatabase whenever an editing session is started, the default for the versioning option in the Editor options is set to "Edit a version of the database with the ability to undo and redo".  Why does this always default to this option being checked?  How can we change this to default to not being checked?  See attached for the option I'm speaking of.

Thanks in advance,
Wes
Reply
0 Kudos
10 Replies
Highlighted
Occasional Contributor II
Why does this always default to this option being checked? 


Versioning is the default geodatabase transaction model and the editing environment of ArcGIS was designed to be version enable (i.e. long transactions, undo/redo functionality, isolated edits, etc) by default.

The check box you are referring to is the method by which you can disable the versioned editing environment and work in the non-versioned editing mode.  So if your organization is not leveraging the functionality of versioning to manage your datasets and is exclusively using nonversioned editing I could see how having to uncheck that box every time would be an unwanted step. 

How can we change this to default to not being checked? 


One way to do this would be to paste the following two functions into 'ThisDocument' of the Normal.mxt in the VBA editor.  Keep in mind if the normal.mxt is deleted arcmap will revert to the default behavior.


Private Function MxDocument_NewDocument() As Boolean

Application.Caption = "Non Versioned Editing is enabled - " & Application.Document.Title

  Dim pEditor As IEditor
  Dim pEditProperties3 As IEditProperties3
  Dim pID As UID
 
  Set pID = New UID
  pID.Value = "esriEditor.Editor"
 
  Set pEditor = Application.FindExtensionByCLSID(pID)
  Set pEditProperties3 = pEditor
  'set the edit mode to nonversioned under editor options
  pEditProperties3.MultiuserEditSessionMode = esriMESMNonVersioned
 

End Function

Private Function MxDocument_OpenDocument() As Boolean
Application.Caption = "Non Versioned Editing is enabled - " & Application.Document.Title
  Dim pEditor As IEditor
  Dim pEditProperties3 As IEditProperties3
  Dim pID As UID
 
  Set pID = New UID
  pID.Value = "esriEditor.Editor"
 
  Set pEditor = Application.FindExtensionByCLSID(pID)
  Set pEditProperties3 = pEditor
  'set the edit mode to nonversioned under editor options
  pEditProperties3.MultiuserEditSessionMode = esriMESMNonVersioned
End Function
Reply
0 Kudos
Highlighted
New Contributor III

Hi,

I realize that this is an old posting, but I tried the code with ArcMap 103.1 and got the error "ambiguous name detected: toolbar".  It seems to hang in the ArcID module. Any suggestions?

Thanks

Reply
0 Kudos
Highlighted
Occasional Contributor II

Hi Heather,

I tried it this morning with 10.3.1 and it worked as expected. You could try renaming the normal.mxt to something like oldnormal.mxt, then launch arcmap again and re paste the code into 'ThisDocument',  if that doesn't work, i would suggest contacting Esri technical support.

Regards,

Ian

Reply
0 Kudos
Highlighted
New Contributor III

Renaming Normal.mxt didn't work for me. I ended up commenting out the bit of ArcID code that it was crashing on (the ambibuous toolbar thingee) and now it works.  Not sure if I broke something else, but I guess time will tell...

Thanks for this code.  Will save me a bit of irritation.

Reply
0 Kudos
Highlighted
New Contributor III

...which brings me to my next question:

With 10.3.1, it seems that the Editing Option "Automatically save changes after each edit." (Versioning tab) is checked by default.  I would like it to be unchecked.  Do you know how I could add a bit of vba to the code, above, to change that default setting?

Thanks,

Reply
0 Kudos
Highlighted
Occasional Contributor II

Hi, It’s not exposed in 10.3.1. We added it for 10.4 as IEditProperties5.AutoSaveNonVersionedEdit

Reply
0 Kudos
Highlighted
New Contributor III

OK.  Thanks for your help.

Reply
0 Kudos
Highlighted
New Contributor
Thanks Ian, that worked great.

We've been discussing versioning vs. non-versioning and at this point the majority of our crew wants to stick with non-versioning because that's the way things have been done around here for years.  I'm trying to learn more about the benefits of versioning because that seems to be what people swear by.  If you have any versioning vs. non-versioning information that you can direct me to I would really appreciate it.

Thanks again,
Wes
Reply
0 Kudos
Highlighted
Esri Esteemed Contributor
Hi Wesley,

FYI: this article is a good place to start to learn about the basics of versioning,

Versioning 101 ArcUser article

For a more detailed discussion, see this whitepaper,

Versioning whitepaper

Hope this helps,
Reply
0 Kudos