Sample - Special Autoupdaters

Version 3

    Versions: 10.0.1 - 10.1

    Product Availability: ArcFM Desktop

     

    The special autoupdaters in this developer sample use the IMMSpecialAUStrategy interface.


    How to Implement:

    1. You may modify the code sample. This step is not required.
    2. Compile the code sample.

    This project contains the following autoupdaters. Some require the configurations shown. Most special autoupdaters are assigned on the Object Info tab in the ArcFM Properties Manager. Those that are assigned elsewhere are indicated below.

     

    Sample Change Abandon Indicator Field (AbandonFieldChange.cs)

    • Assign this AU to Abandoned feature classes using the Abandon Info tab in the ArcFM Properties Manager. Assign it to the On Abandon event.
    • The Abandon Indicator field must have the field model name MMABANDONINDICATOR assigned.


    Sample Abandon Unrelate and Relate (.NET) (AbandonUnrelate.cs)

    • Assign this AU to abandoned conductor feature classes using the Abandon Info tab in the ArcFM Properties Manager. Assign it to the "Abandon and  remove to" event.
    • The abandoned conductor feature class must have the model name MMABANDONRELATE assigned.


    Sample Place Work Location (AutoPlaceWL.cs)

    • This AU may be used only with Designer.
    • Assign it to any feature with which you want to place a work location.
    • Assign this AU to On Feature Create, On Feature Update, or On Feature Delete.


    Sample Segment Split (AutoSegSplit.cs)      

    • Assign this AU to a feature class that snaps to and splits a linear feature class. Assign to the On Feature Create event.
    • The feature class to which this feature snaps requires the SPLITTARGET model name.
    • For example, assign the AU to the On Feature Create event for a Fuse. Assign the SPLITTARGET model name to a Primary OH Conductor feature. When the Fuse is placed on a Primary OH Conductor, the AU will recognize the SPLITTARGET model name and split the linear feature.


    Sample Structure Relate (AutoStruRelate.cs)

    • Available with versions 10.0.2 - current.
    • Assign this AU to the On Feature Create event.
    • The feature class to which this feature snaps requires the STRUCTURE model name.
    • For example, assign the AU to a Switch. Assign the STRUCTURE model name to the Support Structure feature class. Every time a switch is placed within the AU's tolerance, a relationship will be created between the switch and the support structure.


    TransformerUnit Relate Autoupdater (AutoTransformerRelate.cs)

    • This autoupdater creates TransformerUnit related objects based on the PhaseDesignation field of a newly placed Transformer feature.
    • Assign the TRANSFORMER class model name to the Transformer feature class.
    • Assign the TRANSFORMERUNIT class model name to the TransformerUnit table.
    • Assign the PHASEDESIGNATION field model name to the PhaseDesignation field on the Transformer class.
    • The Transformer and TransformerUnit classes must have a relationship class that ties them together.
    • Assign this AU to the On Feature Create event on the Transformer feature class.


    Sample Place Work Location with Work Function Change (AutoWLOnWFValue.cs)

    • Assign the WORKFUNCTION field model name to the Work Function field on any feature class with which you want to place a work location.
    • Assign the AU to the On Feature Create event of the feature class with which you want to place a work location.


    Sample Cancel Edit (CancelEdit.cs)

    • If you wish to implement this class, you must un-comment the code and re-compile the project.


    Sample Update Conductor Text (ConductorText.cs)

    • Assign the CONDUCTOR model name to the conductor feature class.
    • Assign the UNDERGROUND or OVERHEAD model name to the conductor feature class.
    • Assign the LABELTEXT field model name to the field that holds the text to be updated.
    • Assign the PHASEDESIGNATION field model name to the PhaseDesignation field. This field must have the Phase Designation domain assigned.
    • Assign the CONDUCTORSIZE field model name to the Size field. This field must have the Conductor Size domain assigned.
    • Assign the CONDUCTORMATERIAL field model name to the Material field. This field must have either the Conductor Material - Underground or Conductor Material - Overhead domain assigned.
    • Assign this AU to the On Feature Update event on a Conductor feature class.


    Sample Connect Network Feature (Connect.cs)     

    • Assign this AU to the On Feature Create and On Feature Update events of a network junction feature. This AU should be fired along with (and BEFORE) the same network-related AUs as executed in the On Feature Create event.


    Sample Delete Related Conductor Info (DelRelCndctrInfo.cs)     

    • Assign this AU to the On Feature Delete event of a linear feature that has a related ConductorInfo table.


    Sample Inherit Nominal Voltage (InheritNomVoltage.cs)     

    • Assign the PRIMARYCONDUCTOR model name to a primary conductor feature class.
    • Assign the TRANSFORMER model name to the Transformer feature class.
    • Assign the NOMINALVOLTAGE field model name to the NominalVoltage fields of the primary conductor and transformer feature classes.
    • If domains exist, they must be the same on the incoming object and the feature to which the object is connecting.
    • Assign to the On Feature Create events of the primary conductor and transformer feature classes.
    • Inheritance rules are always as follows:
      • PrimaryConductor inherits Nominal Voltage from PrimaryConductor
      • Transformer inherits Nominal Voltage from PrimaryConductor


    Sample Inherit Operating Pressure (InheritOpPressure.cs)     

    • Assign the DISTRIBUTIONMAIN model name to the DistributionMain feature class.
    • Assign the SERVICE model name to the Service feature class.
    • Assign the REGULATOR model name to the Regulator feature class.
    • Assign the OPERATINGPRESSURE field model name to the OperatingPressure field on the DistributionMain, Service and Regulator feature classes.
    • For Gas systems, assign the GASPRESSURESYSTEMSTATUS field model name to the GasPressureSystemStatus field on the DistributionMain, Service and Regulator feature classes.
    • For Water systems, assign the WATERPRESSURESYSTEMSTATUS field model name to the WaterPressureSystemStatus field on the DistributionMain, Service and Regulator feature classes.
    • Assign this AU to the On Feature Create events for the DistributionMain and Service feature classes.
    • Inheritance rules are always as follows:
      • DistributionMain inherits Operating Pressure from DistributionMain
      • Service inherits Operating Pressure first from DistributionMain or second from Service


    Sample Inherit Operating Voltage (InheritOpVoltage.cs)     

    • Assign the PRIMARYCONDUCTOR model name to the PrimaryConductor feature class.
    • Assign the FEEDERSECONDARY model name to the SecondaryConductor feature class.
    • Assign the TRANSFORMER model name to the Transformer feature class.
    • Assign the FDRMGRPROTECTIVE model name to protective devices (e.g., Fuse, Switch)
    • Assign the OPERATINGVOLTAGE field model name to the OperatingVoltage fields on the PrimaryConductor, SecondaryConductor, Transformer, Switch and Fuse feature classes.
    • Assign the LOWSIDEVOLTAGE field model name to the LowSideVoltage field on the Transformer feature class.
    • Inheritance rules are always as follows:
      • PrimaryConductor inherits Operating Voltage from PrimaryConductor
      • Transformer inherits Operating Voltage from PrimaryConductor
      • Switch inherits Operating Voltage from PrimaryConductor
      • Fuse inherits Operating Voltage from PrimaryConductor
      • FeederSecondary inherits first Low Side Voltage from Transformer or second Operating Voltage from FeederSecondary


    Sample Check for Pinchable Pipe (SQCheck.cs)     

    • Assign the DISTRIBUTIONMAIN model name to the DistributionMain feature class.
    • Assign the SERVICE model name to the Service feature class.
    • Assign the GASTRACEWEIGHT field model name to the GasTraceWeight fields on the DistributionMain and Service feature classes.
    • Assign the AU to the On Feature Create event of the Squeeze Off feature class.


    Sample Synch Transformer Unit Phase Designation (SynchXfrUnitPhase.cs)     

    • Assign the TRANSFORMER model name to the Transformer feature class.
    • Assign the TRANSFORMERUNIT model name to the TransformerUnit object class.
    • Assign the PHASEDESIGNATION field model name to the PhaseDesignation field on the Transformer feature class and on the TransformerUnit object class.
    • Assign this AU to the On Feature Update event of the TransformerUnit object class.


    Sample Minerville Update Transformer Text (XFRBankText.cs)     

    • Assign the TRANSFORMER model name to the Transformer feature class.
    • Assign the UNDERGROUND or OVERHEAD model name to the Conductor feature class.
    • Assign the LABELTEXT field model name to the LabelText field on the Transformer feature class.
    • Assign the RATEDKVA field model name to the RatedKVA field on the TransformerUnit object class. This field also requires that the Transformer Unit KVA domain be assigned.
    • Assign the PHASEDESIGNATION field model name to the PhaseDesignation field on the TransformerUnit object class. This field also requires that the Phase Designation domain be assigned.
    • Assign this AU to the On Feature Create, On Feature Update and On Feature Delete events of the TransformerUnit object class.


    Sample Update Transformer Bank Rated kVA (XFRkVA.cs)     

    • Assign the DISTRIBUTIONTRANSFORMER model name to the Transformer feature class.
    • Assign the TRANSFORMERUNIT model name to the TransformerUnit object class.
    • Assign the RATEDKVA field model name to the RatedKVA fields on the Transformer feature class and the TransformerUnit object class.
    • Assign this AU to the On Feature Update event on the TransformerUnit feature class.


    Sample Minerville Update Conductor Text (MnrvlConductorText.cs)     

    • Assign this AU to the On Feature Update event of the ConductorInfo object class.
    • Assign the UNDERGROUND or OVERHEAD model name to the conductor feature class.
    • Assign the LABELTEXT field model name to the field that holds the text to be updated.
    • Assign the PHASEDESIGNATION field model name to the PhaseDesignation field. This field must have the Phase Designation domain assigned.
    • Assign the CONDUCTORSIZE field model name to the Size field. This field must have the Conductor Size domain assigned.
    • Assign the CONDUCTORMATERIAL field model name to the Material field. This field must have either the Conductor Material - Underground or Conductor Material - Overhead domain assigned.
    • Assign this AU to the On Feature Update event on a Conductor feature class.


    Sample Update Fiber Object (UpdateFiberObject.cs)

    • Available with versions 10.0.2 - current.
    • Use this autoupdater to update a text field that indicates the connectable object's availability based on its status in the Connection Manager.   
    • Add the SAMPLEMODELNAMEFORFIBERUPDATE model name to the Fiber Field Model Name domain.
    • Create a text field (e.g., Availability) on the F_FIBER table. This is the field that will be updated.
    • Create this same text field on each connectable object in the database as well (e.g., F_BACKSIDEPORT, F_DEVICEPORT, F_FRONTSIDEPORT,     F_SPLITTERINPUTPORT, F_SPLITTEROUTPUTPORT).
    • Assign the SAMPLEMODELNAMEFORFIBERUPDATE model name to the text field created above on the F_FIBER table and each connectable object in the database.
    • Assign this AU to the On Feature Create, On Feature Update and On Feature Delete events on the F_FIBERCONNECTIONOBJECT table (or whichever table represents connections).
    • To see this AU in action: In ArcMap, connect/disconnect cables using the Connection Manager. The field you created on the F_Fiber class (or other connectable object class) will read "Available" if it has been disconnected and "Unavailable" if it has been connected.

     

    Requires:

    All of the files shown below are required for the solution to build successfully.

     

    FileDescription
    SampleSpecialAutoupdaters.csprojC# project containing the code to generate a custom special autoupdater
    AbandonFieldChange.csThe Sample Change Abandon Indicator Field AU changes the value of the Abandon Indicator field to Yes. Abandon Indicator field must have the field model name MMAbandonIndicator assigned.
    AbandonUnrelate.csThe Sample Abandon Unrelate and Relate AU unrelates the ConductorInfo table from the conductor before it is abandoned and re-relates it to the conductor after it has been abandoned.
    AutoPlaceWL.csThe Sample Place Work Location AU places a Work Location near the feature. It may be used with On Feature Create, On Feature Update, or On Feature Delete events. This AU is used only with Designer.
    AutoSegSplit.csThe Sample Segment Split AU searches for a feature class with model name 'SplitTarget', if found, the object placed splits the feature and snaps itself to it.
    AutoStruRelate.cs

    The Sample Structure Relate AU searches within a tolerance for features with a model name of 'Structure'. If found, then a new relationship is created between the placed feature and the structure feature. The default search tolerance is 25 map units. This value is hard-coded and may be modified by customizing the developer sample.

    Note: The tolerance value is the radius of the search area centered on the feature. Because this autoupdater uses a FeatureCache to get nearby features rather than a Search with a SpatialFeature, the radius extent is square rather than round.

    Available with versions 10.0.2 - current.

    AutoTransformerRelate.csThis autoupdater creates TransformerUnit related objects based on the PhaseDesignation field of a newly placed Transformer feature.
    AutoWLOnWFValue.csThe Sample Place Work Location with Work Function Change AU places a Work Location near the feature when its work function is changed from None to any other selection (e.g., Remove, Replace, Install, etc.). It may be used with the On Feature Update event. This AU is used  only with Designer.
    CancelEdit.csThe Cancel Edits autoupdater cancels the current edit and reverses the changes that the edit has made. This AU is not registered to a component category and is not available in the ArcFM Properties Manager.
    ConductorText.csThe Sample Update Conductor Text AU updates features that have a field with the model name LabelText when constituent conductor information changes (looks at four domains: Phase Designation, Conductor Material - Overhead, Conductor Material - Underground, Conductor Size).
    Connect.csThe Sample Connect Network Feature connects a point feature to the network if it is being moved (SHAPE change) and is not currently connected.
    DelRelCndctrInfo.csThe Sample Delete Related Conductor Info AU removes the conductor information from the ConductorInfo table in ArcCatalog when the conductor is deleted in ArcMap.
    InheritNomVoltage.csThe Sample Inherit Nominal Voltage AU populates the nominal voltage of the incoming object (IObject) with the value of the feature to which it is connecting.
    InheritOpPressure.csThe Sample Inherit Operating Pressure AU populates the operating pressure of the incoming object (IObject) with the value of the feature to which it is connecting.
    InheritOpVoltage.csThe Sample Inherit Operating Voltage AU populates the operating voltage of the incoming object (IObject) with the value of the feature to which it is connecting.
    MnrvlConductorText.csThe Sample Minerville Update Conductor Text AU updates the LabelText field of a Primary Overhead Conductor when any related ConductorInfo objects are changed. This will subsume phases with like Conductor Size and Conductor Material. It will also put all labels on one line.
    SQCheck.csThe Sample Check for Pinchable Pipe AU checks that pipe is pinchable; used for squeeze off tracing to isolate area in gas network.
    SynchXfrUnitPhase.csThe Sample Synch Transformer Unit Phase Designation AU updates the phase designation field of the related tranformer unit.
    ULSCrossSectionAnnotationRespondingToFeederIDUpdates.cs

    A special autoupdater that simply invokes the existing "ArcFM Check Cross Section" autoupdater, while artificially overriding the current AU mode so that the original AU will not hold back its labor (which it ULSCrossSectionAnnotationRespondingToFeederIDUpdates.clswould do in the event that the current AU mode is "Feeder Manager."

    Available with versions 10.1 - current.

    UpdateFiberObject.cs

    The Sample Update Fiber Object AU may be used with Fiber Manager. It updates a field value on connectable fiber objects when they are connected or disconnected. It requires the SampleModelNameForFiberUpdate model name.

    Available with versions 10.0.2 - current.

    XFRBankText.csThe Sample Minerville Update Transformer Text AU updates the LabelText field of a Transformer Bank when any related TransformerUnit objects are changed.
    XFRkVA.csThe Sample Update Transformer Bank Rated kVA AU updates the RatedKVA field of the Transformer when its TransformerUnit object's Rated kVA has been modified.
    AutoPlaceWLHelper.csContains functions common to AutoPLaceWL.cs and AutoWLOnWFValue.cs.
    AutoUpdaterUtilities.csContains functions common to autoupdate strategies.