As consultants within the ESRI Electric, Gas, and Water utility space, we often work with clients using the Telvent ArcFM™ extension for ArcGIS. One of the foundational elements of ArcFM™ is the AutoUpdater (AU) which allows a customer to configure a module of custom code to fire as a triggered event on any GIS table event – onCreate, onUpdate, onDelete, onSplit, etc. AU’s are great – they capture the username of the last editor, the last update date, can automatically set additional fields based on spatial location or other attributes, or can do just about anything else you might imagine on a triggered event. However, we have consistently run into a request from clients that want to perform a mass update on a set of records within ArcGIS without the AU’s firing. Our initial response is usually that they can temporarily un-configure the AU within ArcCatalog but many users don’t like that option for a variety of reasons we won’t get into here. Our second recommendation is that they execute a few simple lines of VBA (Visual Basic for Applications) code which will disable the AU’s within the current edit session within ArcMap. This request has come through often enough that we believe this script will prove to be useful to more users in the community.
The benefit of this script is that the AU’s are only disabled for the current user who runs the script within the current edit session. Once the user has saved their mass updates, closes ArcMap, and then restarts ArcMap they are completely back to normal – AU’s are on and firing once again. To use this script follow these steps:
-
-
- Start ArcMap, optionally log in to ArcFM™, and load your data.
- Open a version for editing using either the ESRI versioning tools OR a Telvent Session or Design.
- Start editing.
- Within ArcMap drop down the Tools menu and choose Macros → Visual Basic Editor.
- Within the Visual Basic environment, expand the Normal.mxt file and insert a new Module within the Modules folder:
- Once your new module has opened cut and paste the following script into the module window:
Public Sub TurnOffAUs()
Dim mmAu2 As IMMAutoUpdater
Set mmAu2 = New MMAutoUpdater
mmAu2.AutoUpdaterMode = mmAUMNoEvents
MsgBox “AU’s are OFF!”
End Sub
The script window will look like this:
- Next within the Visual Basic environment, go to Tools → References, scroll down to the Miner & Miner entries and check on the entry for “Miner & Miner 9 Geodatabase Object Library”:
Click OK…
- Place your cursor anywhere within the script text and then click the Run button at the top of the Visual Basic window:
(or click F5 on your keyboard). This will run the script.
- If everything runs correctly you should see a message box informing you that the AU’s have been turned off:
- Perform your mass updates as required; no AU’s should fire.
- Save edits and exit ArcMap.
-
Now our good friends at Telvent will be quick to point out that we should not be disabling the AU’s and perhaps shouldn’t be helping others to do so. With the expectation of this feedback we want to proactively include a general disclaimer with this article – The AU’s should not be disabled in a typical edit session because they ensure the integrity of the underlying business data. These steps should only be used by an experienced GIS system administrator or analyst who fully understands the mass updates they will be performing on the data and has a specific need to turn off the AU’s. We do understand that this specific need will indeed arise from time to time and hope this article will be used responsibly by our readers.
Edward Juarbe says:
Any chance this blog will be updated for 10.2.x? I tried this and found the Object Library names have changed (step 7) for my version of ArcFM.
Edward Juarbe says:
Nevermind previous inquiry about updating blog… I found the object library…
Skye Perry says:
Yep, they should be pretty close. Let me know if you need any more direction Ed!
Chris Tognela says:
Hi Skye, I can’t get that code to run under ArcMap 10.2.1/ArcFM 10.2.1.a.
I get an error
Compile error: Ambiguous name detected: DesignOptiomization
Any thoughts?
Thanks,
Chris
Skye Perry says:
That’s a common issue. If you click the BREAK button when the error is shown, it will take you to a global file in VBA called ArcIds. The easiest way to resolve this is to select the block of code named DesignOptimization as shown in the below picture, then add your Edit toolbar (View –> Toolbars –> Edit) and then click the highlighted button below to comment out this code:

This won’t hurt anything and you can uncomment it after you are done if it makes you feel better. When the code is commented out it will show as green with single quotes ahead of each line:

This should take care of it for you!
Skye Perry says:
A quick picture of the library references in v10 (including 10.2.1):