This document is archived and information here might be outdated. Recommended version. |
Finds an extension by its name.
[Visual Basic .NET] Public Function FindExtensionByName ( _ ByVal extensionName As String _ ) As IExtension
[C#] public IExtension FindExtensionByName ( string extensionName );
extensionName specifies the name of an extension as a string.
To find the Name of an ESRI extension, refer to the following technical document:
ArcGIS Developer Help > Technical Documents > Names and IDs > Extensions
If an extension is registered as a Just-In-Time extension, FindExtensionByName may return nothing. The safest way to get a reference to any extension is to use FindExtensionByCLSID.
The following finds the Editor extension using its name.
public void GetExtByName(app As IApplication)
{
IExtension editorExtension;
editorExtension = app.FindExtensionByName("ESRI Object Editor");
}
The following finds the Editor extension using its name.
Sub GetExtByName(app As IApplication)
Dim editorExtension As IExtension
editorExtension = app.FindExtensionByName("ESRI Object Editor")
End Sub