ArcFM Desktop Developer Guide
Customization Concepts and Tips

Resource Center Home

While this document assumes a good working knowledge of Visual Studio (C#), there are several aspects of programming that are noteworthy in the context of customizing the ArcFM Solution. The examples contained herein assume that you are familiar with the concepts listed in this section.

Implementing COM Interfaces

Like any COM interface, you will need to 'stub out' all the interface’s methods when implementing it. In other words, even if you aren’t going to add custom code to these methods, you will still need to include the methods as empty procedures. Similarly, you must set all the properties of the interface.

Component Categories

Typically, when customizing ArcFM, two things need to be done. First, you must implement the correct interface(s) needed for your customization. Second, you’ll need to register your new component into the correct component category. Component categories allow COM objects to be placed in groups that represent a certain type of functionality. For example, an application might have a 'Toolbar' category that will allow you to register and add custom toolbars to that application. Perhaps you’ve seen this if you’ve purchased third-party add-on tools for your word processing software. ArcMap works the same way. ArcMap has many component categories that allow you to extend its functionality by adding your own components. ArcFM is a good example of this. Similarly, ArcFM has its own component categories that allow you to add your own custom functionality.

If you would like to investigate this further, use the Esri Component Categories Manager. This tool allows you to browse the component categories that Esri provides. If you have ArcFM installed, you will see the Schneider Electric component categories as well.


M&M Component Categories

Each type of customization has a corresponding component category into which it must be registered.

C# - Making Your New Component Available

There are two methods to register your C# component. ArcFM installs RegX.exe in ArcFM Solution\Bin. You may drag and drop your .dll on top of the executable to register it. This method requires a single line of code in your project for each component category into which it is registered. Schneider Electric recommends using RegX.exe.

The second method is to use the Regasm utility. Regasm is installed with the .NET Framework. Once you've compiled the project, select the component (typically a .dll), and execute the Regasm utility. This method requires additional code in your project. Code samples for both methods are shown and discussed on the Register C# Components page.

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com