Using the Custom Action Project Template
The Tracking Server SDK is required to execute this procedure.
Microsoft Visual Studio 2008 or 2010 is required to execute this procedure.
Either an ArcGIS for Desktop or ArcGIS Engine for Windows installation is required to execute this procedure.
Custom actions can be created to execute custom data processing on tracking data. An action can belong to one or more of the following categories: server actions, service actions, layer actions, and real-time layer actions.
The C# Custom Action Project Template can be used to create a custom action of any of these types.
- Start Visual Studio and create a new project. The New Project dialog box appears.
- In the Project types listing, select Visual C# > ArcGIS > Engine.
If you have installed the Tracking Server SDK, then the ArcGIS heading appears in the Visual C# section of the Project types listing, and the available C# templates are under this heading.
- Select TrackingCustomAction from the list of installed templates.
- Enter additional information required for your new project and click OK to create the project. For example, you might want to change the name and location of your project.
- If you have ArcGIS for Desktop installed, you can uncomment several areas of the project code to expose functionality that is only available with ArcGIS for Desktop. To find these areas, serach for the phrase "TODO" throughout the entire project and follow the instructions.
If you have ArcGIS Engine for Windows installed, do not uncomment these areas of code.
- Based on the type of action you want to create, uncomment the appropriate lines of code from both the ArcGISCategoryRegistration and ArcGISCategoryUnregistration functions in the "CustomAction.cs" file. A single action may be registered under multiple categories.
The available action categories are:
- Server Action
- Service Action
- Real-time Layer Action
- Layer Action
- Add custom code to the classes in the project to achieve the desired result. To find the areas where it is suggested to modify the code, search for the phrase "TODO" throughout the entire project and follow the instructions.
- Build the project.
- Your custom action is ready for use.
If you have ArcGIS for Desktop installed, then layer actions, real-time layer actions, and service actions will be available in the appropriate layer or service properties dialog boxes. If you have Tracking Server installed, then server actions will appear in Tracking Server Manager.