ArcFM Engine Developer Guide
Suppress or Disable Autoupdaters

Version: 10.6.1a

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. Since 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 is MMArcMap. Performing this additional check ensures that your code places the autoupdaters back into their previous state. 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 are disabled

//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.

Under certain circumstances, suppressing all AutoUpdaters from firing is required, including the reasons expressed above. When mmAUNoEvents is set, edit events can be captured, and other AutoUpdater modes like mmAUMSplit, can still be applied during execution of the task to leverage the AutoUpdater framework, as desired. When absolutely no AutoUpdaters should fire while processing edit events, the mmAUMSuppressAll mode can be applied, which prevents all AutoUpdaters, including attribute, special, relationship, and abandon AUs, from firing from ArcFM Solution.

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;

//Suppress all autoupdater events
autoupdater.AutoUpdaterMode = mmAutoUpdaterMode.mmAUMSuppressAll;

//Insert code that needs to execute while all autoupdaters are suppressed

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

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com