ArcFM Desktop Overview > ArcFM Solution Basics > Autoupdaters |
When working with features in your geodatabase, you will find the need to automate certain data tasks. For example, you might want to record the creation date of a feature, or have the feature automatically rotate when snapped to a line. You might want to establish a relationship between a point feature you’ve just added to an adjacent street, building, or utility pole. An AU can also raise an error that will cause the autoupdater component to cancel the current edit and undo the changes that the edit has made.
The ArcFM Autoupdater framework was designed to perform these types of tasks. The goal of the MMAutoUpdater is to provide a means of performing tasks specific to a feature when certain events take place in the edit environment. These are called autoupdate strategies and are executed in configuration order by the MMAutoUpdater. There are three types of autoupdate strategies:
The ArcFM Properties Manager allows you to assign multiple autoupdaters to a single event rather than assigning them programmatically. See the Configuring ArcFM Solution online help in ArcCatalog for more information.
During the use of ArcFM, when a feature is added, updated or deleted, an event is fired. The MMAutoUpdater ‘listens’ for these events and can be instructed to perform a certain task for a given event. Applications for custom autoupdate strategies could be:
Metadata Management - After users add or change a feature on the map, they want to update an attribute with a value. For example, they may wish to update a "CreateDate" field with the current date when a new feature is added, or update an "EditUser" field with the name of the user who edits an existing feature. Other events, fields, and values are possible, and can vary based on feature class or subtype.
Inventory Tables - A utility has a database table that stores an inventory of devices. When a device is deployed in the field, the unit is removed from the available inventory. So when a device is added to the map, the MMAutoUpdater could remove the device’s corresponding inventory record.
Automatic rotation of point features - Certain features might need to snap to a linear feature. Moreover, mapping standards might require the feature to be rotated so that it is aligned with the linear feature when it is added.
Attribute AUs are usually easier to implement than special AUs. This is because there is typically less coding involved when developing an attribute AU. Attribute AUs update attributes. In response to an event, an Attribute AU can update the value contained in the field of a feature’s table.
Special AUs are broader in scope. Not confined to work with a specific field of the feature, special AUs are simply tasks that can be assigned to run in response to an editor event. These tasks can be as simple as showing a message box or as complicated as performing multiple queries and updating records in an external database.
Relationship AUs may be assigned to a relationship class to update attributes of specific related objects in response to an editor event. The ArcFM installation includes a sample relationship AU called ArcFM Update Rated kVA. This AU adjusts the rated kVA of the transformer bank when a transformer unit is added or deleted.
If multiple types of autoupdaters are assigned to a feature/object class, the autoupdaters are launched in the following order:
The only exception to this order is when a relationship is deleted. In this case the relationship autoupdaters are fired before the special autoupdaters.
This section provides an overview of the ArcFM autoupdater and discusses how to code your own custom autoupdater strategies. It also provides information about disabling autoupdaters.