com.esri.arcgis.carto
Interface ILayerFactoryHelper

All Superinterfaces:
Serializable
All Known Implementing Classes:
LayerFactoryHelper

public interface ILayerFactoryHelper
extends Serializable

Provides access to members used to create layers from names.

Description

Provides a helper method to iterate the Layer Factory component category to find a layer factory object that is used to create one or more layer objects.

Remarks

The CreateLayersFromName method internally iterates the objects in the "Layer Factory" component category and uses the ILayerFactory::CanCreate and ILayerFactory::Create methods to create the layers. Numerous layer factories are registered in the "Layer Factory" component categories with all ArcGIS products.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 IEnumLayer createLayersFromName(IName name)
          Given a name attempts to open it using the layer factories, if successful returns a layers enumerator.
 

Method Detail

createLayersFromName

IEnumLayer createLayersFromName(IName name)
                                throws IOException,
                                       AutomationException
Given a name attempts to open it using the layer factories, if successful returns a layers enumerator.

Description

Use this method to create a data Layer or Layers from an IName object. Each IName instance is passed to CreateLayersFromName to return an enumerator of layers containing a new instance of each layer.

This is typically used for drag and drop. For example, if a feature layer is dragged from an ArcCatalog application and dropped onto the MapControl or PageLayoutControl, objects implementing IName can be extracted from the drop using the IName DataObjectHelper.

Remarks

The CreateLayersFromName method is of limited use to ArcGIS Engine and ArcGIS Server developers because there is only a small subset of layer factories present and registered in the 'Layer Factory' component category. The CreateLayersFromName method internally iterates the objects in the "Layer Factory" component category and uses the ILayerFactory::CanCreate and ILayerFactory::Create methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - A reference to a com.esri.arcgis.system.IName (in)
Returns:
A reference to a com.esri.arcgis.carto.IEnumLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.