Interface ICustomizationFilter

All Superinterfaces:
All Known Implementing Classes:

public interface ICustomizationFilter
extends Serializable

Provides access to members that define a customization filter.


A customization filter provides a mechanism to lock parts of the customization functionality in the ArcGIS applications. You should only use customization filters in locked down applications where you have complete control of the application setup and how the users interact with that application.


To activate your customization filter you would pass it into the IApplication::LockCustomization method. You can make the call to LockCustomization in a simple VBA macro, in the MxDocument_OpenDocument or MxDocument_NewDocument event in VBA, or in an extension. If this is done in a macro or the open document event in VBA, make sure that the VBA project has a reference the class that implements the customization filter.

If the customization filter is applied in an extension, you must be aware of the application start up sequence in order for this to work correctly. Also be aware that your customization filter applied by an extension may override other locking logic that might be saved in an existing ArcMap document or that another extension might activate a customization filter before your extension is even loaded. There can only be one active customization filter in a running application.

When To Use

To create a custom customization filter you would implement the ICustomizationFilter interface in a class module. The ICustomizationFilter interface has an OnCustomizationEvent event that gets fired whenever a user attempts any type of customization.

Product Availability

Available with ArcGIS Desktop.

See Also:
IApplication.lockCustomization(String, com.esri.arcgis.framework.ICustomizationFilter)

Method Summary
 boolean onCustomizationEvent(int custEventType, Object eventCtx)
          Occurs when certain types of customization occur.

Method Detail


boolean onCustomizationEvent(int custEventType,
                             Object eventCtx)
                             throws IOException,
Occurs when certain types of customization occur.


custEventType One of six types of customization events that can happen. These are defined by the esriCustomizationEvent constants.

eventCtx provides event context information for each type of customization event. Refer to the list below to see what type of information is provided by eventCtx for each customization event type.

custEventType eventCtx
esriCEAddCategory string representing category name
esriCEAddCommand UID or string identifying a command
esriCEShowCustDlg nothing
esriCEShowVBAIDE nothing
esriCEInvokeCommand CommandItem
esriCEShowCustCtxMenu nothing
esriCERunVBACode string representing the project.module.function
esriCEEditVBACode string representing the project.module name


In the Customize dialog, Macros, Menus, New Menus, and UIControls are four special categories that are formatted with the square bracket ([]) to indicate they are associated with special functionalities.

However, the eventCtx parameter always supplies the unformatted category name for custEventType esriCEAddCategory even though they are enclosed in square brackets in the Customize dialog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms


custEventType - A com.esri.arcgis.framework.esriCustomizationEvent constant (in)
eventCtx - A Variant (in)
The bDeny
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IApplication.lockCustomization(String, com.esri.arcgis.framework.ICustomizationFilter), esriCustomizationEvent