ArcFM Engine Developer Guide
Disable Autoupdaters

Version: 10.2.1c and 10.2.1c SP3

Resource Center Home

Many autoupdaters perform some type of quality assurance or automate the creation of data upon editing; however, autoupdaters also fire, by default, during mass data load operations. Because this behavior may not be necessary or desirable, you can run code that temporarily turns autoupdaters off.

When turning autoupdaters off, it is a good idea to store the current autoupdater mode. In most cases, the current mode will be MMArcMap. Performing this additional check ensures that your code places the autoupdaters back into their previous state. Note that if you turn autoupdaters off through code, you may want to add code to the error handler that returns the autoupdaters back to their original modes.

C# Snippet
Copy Code
//Create an MMAutoupdater singletonType
Type type = Type.GetTypeFromProgID("mmGeodatabase.MMAutoUpdater");
object obj = Activator.CreateInstance(type);
IMMAutoUpdater autoupdater = obj as IMMAutoUpdater;

//Save the existing mode
mmAutoUpdaterMode oldMode = autoupdater.AutoUpdaterMode;

//Turn off autoupdater events
autoupdater.AutoUpdaterMode = mmAutoUpdaterMode.mmAUMNoEvents;

// insert code that needs to execute while autoupdaters 

//Turn autuopdater events back on.
autoupdater.AutoUpdaterMode = oldMode;

 

Some Feeder Manager tools (e.g., Trace A Feeder, Initialize Trace Weights) disable autoupdaters to improve performance.

 

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com