ArcFM Desktop Developer Guide
Custom Work Function Calculator

Resource Center Home

The Work Function Tool in Designer allows a user to select an existing feature and replace it with a different compatible unit (CU). When the user replaces a CU on the map, the GIS unit (GU) that contains the install and the remove CUs is assigned a work function of Replace (see example below).

The default algorithm that determines the GU work function looks for a CU with an install work function and a CU with any other work function.

You may create a custom calculator to customize the criteria for assigning the Replace work function. Use the IMMWorkFunctionCalculator interface to create your custom calculator.


Interfaces:
    IMMWorkFunctionCalculator


Figure 1, The default algorithm identifies an Install CU and a non-install CU (e.g., replace, abandon).

Basic Steps for Implementing Custom Work Function Calculators

  1. Implement IMMWorkFunctionCalculator and all its methods.

  2. Determine the values the work function calculator should return in specific cases using the GetWFValue function (see code sample).

  3. Create or edit the MM Work Function domain. Right click the geodatabase and select Properties. Add or locate the domain on the Domains tab.

  4. Implement your custom work function calculator using the steps below.

When editing the MM Work Function domain, do not modify or remove any of the following values: Install (1), None (0), Replace (-10).


Implement Custom Calculator

Once you have created your custom work function calculator, it must be implemented. To implement a custom calculator, you must set the appropriate registry key. Perform the following steps:

  1. In the Registry, browse to the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Miner and Miner\Designer8\Work Function

  2. In the Work Function folder, right click the item called Calculator Object and select Modify.

  3. In the Value Data field, enter the ProgID of the calculator object.

  4. Click OK.

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com