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


ILayerFile Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IL > ILayerFile Interface
ArcGIS Developer Help

ILayerFile Interface

Provides access to members that control the reading and writing of layer document files.

Product Availability

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

Members

Name Description
Method Close Close the layer file.
Read-only property Filename The name of the layer file that the LayerFile coclass is linked to.
Read-only property IsLayerFile Indicates if the file is a valid layer file.
Read-only property IsPresent Indicates if the layer file is present.
Read-only property IsReadOnly Indicates if the layer file is read only.
Read-only property Layer The Layer object. If no layer object is stored in the layer file this returns NULL.
Method New Creates and opens a new layer File in preparation for the contents to be retrieve or updated.
Method Open Open the layer file in preparation for the contents to be retrieved or updated.
Method ReplaceContents Replace the contents of the layer file.
Method Save Save the contents of the layer file to the bound file.
Method SaveAs Save the contents of the layer file to the specified file name.
Read-only property Thumbnail The thumbnail stored in the layer file. If this is empty E_FAIL is returned.

Classes that implement ILayerFile

Classes Description
LayerFile The LayerFile coclass is used to read and write layer document files.

.NET Samples

Save a layer file in a MapControl application Route layer Working with packages in ArcGIS Engine