Versions: 10.0.1 - current
Product Availability: ArcFM Desktop (Designer license required)
The Work Function Tool in Designer allows a user to select an existing feature and replace it with a different compatible unit (CU). The default algorithm that determines the GIS unit (GU) work function looks for a CU with an install work function and a CU with any other work function. You may use IMMWorkFunctionCalculator to create a custom algorithm to customize the criteria for assigning the Replace work function. The work function calculator developer sample sets the GU work function to Replace if it contains one Install CU and at least one Remove CU.
How to Implement:
- You may modify the code sample. This step is not required.
- Build the solution sample.
- Create a Registry key called Work Function at the following location in the Registry (if it doesn't already exist):
- 32-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Miner and Miner\Designer8\
- 64-bit: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Miner and Miner\Designer8\
- Right-click the Work Function key and create a String Value called Calculator Object.
- Right-click the Calculator Object String Value and select Modify.
- Enter the progID of the .cs you wish to use in the Value Data field. The progID is [Project Name].[Class Name]. For example: SampleWorkFuncCalculator.UnitOnlyCUs.
How to Use:
There are various ways to see this tool in action. The following steps are just one scenario.
- In ArcMap, start an edit session (or open a design).
- Select the CUs tab and set the Work Function field to Install.
- Send a CU to the Targets tab (e.g., Transformer). This results in a GU under which resides a CU.
- Select the GU (top level node) and note that its Work Function is set to Install.
- Now, set the Work Function field on the CUs tab to Remove.
- Drag a similar CU (e.g., another Transformer) and drop it onto the GU you just added. This results in two CUs under the GU.
- Select the GU and note that its work function is now Replace.
All of the files shown below are required for the solution to build successfully.
|SampleWorkFuncCalculator.csproj||C# project containing the code to generate a custom work function calculator.|
|UnitOnlyCUs.cs||This class module provides an example of a custom work function calculator object.|