Create Layer Files


This sample creates layer files for each selected feature layer in the ArcMap Display table of contents.

How to use:
  1. Browse and select the CreateLayerFile.dll using the 'Add from File' button on the Customize dialog.
  2. From the 'Developer Samples' category, add the 'Create Layer File(s)' command to the desired toolbar.
  3. Select one or more feature layers in the Table of Contents.
  4. Select the command you just added. In the dialog box that appears, select a folder where you want to create the layer files.


Difficulty: Intermediate

Visual Basic
File Description
clsCreateLayerfiles.cls Class file containing the implementation for the command.
frmBitmap.frm Form containing the bitmap resource.
CreateLayerfiles.vbp The project file.
CreateLayerfile.dll The compiled project.

Key CoClasses: GxDialog, GxLayer
Key Interfaces: IGxDialog, IGxObject, IEnumGxObject, IGxObjectFilter, IGxLayer, IGxFile