This document is archived and information here might be outdated.  Recommended version.


IApplication.FindExtensionByName Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Framework)  

IApplication.FindExtensionByName Method

Finds an extension by its name.

[Visual Basic .NET]
Public Function FindExtensionByName ( _
    ByVal extensionName As String _
) As IExtension
[C#]
public IExtension FindExtensionByName (
    string extensionName
);

Product Availability

Available with ArcGIS Desktop.

Description

extensionName specifies the name of an extension as a string.

 

Remarks

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.

[C#]

The following finds the Editor extension using its name.

public void GetExtByName(app As IApplication)
{
   IExtension editorExtension;
   editorExtension=app.FindExtensionByName("ESRI Object Editor");
}
[Visual Basic .NET]

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

See Also

IApplication Interface | IExtension Interface

.NET Snippets

Get Network Analyst Extension | Statements - Get Network Analyst Extension

.NET Related Topics

NetworkAnalystUI