Sample - Phase Swap Helper

Version 2

    Versions: 10.0.1 - current

    Product Availability: ArcFM Desktop

     

    Phase swap helpers access each feature and related object in a phase trace before it is swapped. This gives a developer the opportunity to perform edits on the feature or related object before the phase swap operation occurs.

    The phase swap helper created in the example below first identifies the incoming object as a primary or secondary conductor. It then updates the conductor's phase orientation field to synchronize with the new value (resulting from the phase swap).

     

    How to Implement:

    This developer sample doesn't offer a different user interface or functionality. It illustrates how you can attach another operation to the phase swap operation.

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


    How to Configure:

    1. In ArcCatalog, Create the PhaseOrientation domain according to the specifications below.
    2. In ArcCatalog, assign the Phase Orientation domain to the PhaseOrientation field on your primary conductor feature class. Assign the domain on the Subtypes tab in the Properties window.
    3. In ArcCatalog, assign the PRIMARYCONDUCTOR model name to your primary conductor feature class(es).
    4. In ArcCatalog, assign the PHASEDESIGNATION field model name to the PhaseDesignation field on your primary conductor feature class(es).
    5. In ArcCatalog, assign the PHASEORIENTATION field model name to the PhaseOrientation field on your primary conductor feature class. This field model name may need to be added to the Electric Field Model Names domain.


    Phase Orientation Domain Specifications:

    If the Phase Orientation domain doesn't exist in your geodatabase, you will need to create it. All codes and values in the PhaseOrientation domain must be unique. You may create a Long Integer or Text domain, depending on the field type of the PhaseOrientation field.

     

    Long Integer field type

    • Field Type: Long Integer
    • Domain Type: Coded Values
    • Split Policy: Default Value
    • Merge Policy: Default Value
    • Values:                                                                                                                                                                                                                                                                                                                                   
      CodeValue
      4A
      2B
      1C
      6AB
      5AC
      14BA
      3BC
      13CA
      11CB
      7ABC
      15ACB
      23BAC
      31BCA
      39CBA
      47CAB
                                                                                                                                                                                                                                                                                                                                                               

     

    Text field type

    • Field Type: Text
    • Domain Type: Coded Values
    • Split Policy: Default Value
    • Merge Policy: Default Value
    • Values:
      CodeValue
      AA
      BB
      CC
      ABAB
      ACAC
      BABA
      BCBC
      CACA
      CBCB
      ABCABC
      ACBACB
      BACBAC
      BCABCA
      CBACBA
      CABCAB

     

    How to Use:

    Follow the steps outlined in the Using Guide to conduct a phase swap operation.


    Requires:

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

     

    FileDescription
    PhaseSwapHelper.csprojC# project containing the code to generate a Phase Swap Helper.
    UpdatePhaseOrient.csThis class module provides an example of a custom phase swap helper object.
    PhaseHelpUtils.csSupporting functions and procedures for the .cs file.