ArcFM Engine Developer Guide
Geodatabase Manager: Action Handlers

Resource Center Home

Product Availability: Geodatabase Manager (ArcFM Desktop, ArcFM Engine)

Geodatabase Manager uses action handlers to perform specific tasks on certain events. Action handlers are provided with Geodatabase Manager, but you may also create custom action handlers. This developer sample offers two sample action handlers. 

Developer Sample: Developer Samples\Geodatabase Manager\C# - Action Handlers\Miner.Samples.ActionHandlers

How to Implement:

  1. You may modify the code sample. Each custom action handler class must inherit from ActionHandler or PxActionHandler. Override the Enabled and SubExecute (or PxSubExecute) methods. This step is not required.
  2. Open the solution and select Project > Miner.Samples.ActionHandlers Properties.
  3. On the Signing tab, create a strong name key file to sign the assembly. Uncheck the box to delay the signing.
  4. Build the solution.
  5. Copy Miner.Samples.ActionHandlers.dll into Program Files (x86)\Miner and Miner\ArcFM Solution\bin.
  6. Open a Visual Studio 2010 Command Prompt.
  7. Build the assembly with a strong name and make note of the resulting public key token. You will need this for the configuration file. The screenshot below shows how to use sn.exe to assign a strong name and get the public key token for configuration.

  1. Next, you'll add your custom action handler to the Geodatabase Manager configuration file. Open GeodatabaseManagerAdmin.exe.config. By default, this file is installed here: C:\Program Files (x86)\Miner and Miner\ArcFM Solution\Bin.
  2. Look for the following XML:
Copy Code
  <ActionHandlerAssemblies>
    <ActionHandlerAssembly type="Miner.Geodatabase.Engine, Version=10.1.0.0, Culture=neutral, PublicKeyToken=196beceb052ed5dc"/>
    <ActionHandlerAssembly type="Miner.Process, Version=10.1.0.0, Culture=neutral, PublicKeyToken=196beceb052ed5dc"/>
  </ActionHandlerAssemblies>
  1. Add an <ActionHandlerAssembly> tag for your custom project. Update the type attribute with your assembly name and the PublicKeyToken value. For example:
Copy Code
    <ActionHandlerAssembly type="Miner.Samples.ActionHandlers, Version=10.1.0.0, Culture=neutral, PublicKeyToken=04352abd332ef1ac"/>
  1. Save and close GeodatabaseManagerAdmin.exe.config.

How to Use:

  1. Open Geodatabase Manager.
  2. Select the Version Processing tab and add an action handler to one of the events on which the sample action handlers are available (e.g., Before Reconcile, Before Post on a design).
  3. Select the action handler in the tree at the left and choose your sample action handler from the Action Handler field at the right.

 

Requires:

All of the files shown below are required for the solution to build successfully. Download these files from the ArcFM Solution Resource Center here.

File

Description

Miner.Samples.ActionHandlers.csproj

C# project containing the code to create custom action handlers for use in Geodatabase Manager.

LogToReconcileHistory.cs
  (view code)

Class for a sample action handler that writes information about the reconcile process.

PxDeleteByWorkFunction.cs
  (view code)

Class for a sample action handler that deletes objects based upon their work functions.

The following files provide supporting information for the .cs file and are required for the project to compile successfully.

AssemblyInfo.cs

Class module to support the tool

The following reference files are required for the project to compile successfully.

Esri.ArcGIS.Geodatabase

Esri.ArcGIS.System

log4net

Miner.Geodatabase.Engine

Miner.Interop.Geodatabase

Miner.Interop.Process

Miner.Process

System.Core

System.Xml

 

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com