Some interesting notes:
- Layer packages are backwards compatible with ArcGIS 9.3.1.
A warning is issued when this tool encounters an unsupported layer type (a schematics or tool layer).
For layers that contain a join or participate in a relationship class, all joined or related data sources will be consolidated into the output folder.- The Schema Only parameter, if checked, will only consolidate the schema of the input data source(s).
Example of Consolidating all Layers:
import arcpy
import os
env.workspace = r"c:\temp"
listLayers = arcpy.ListFiles("*.lyr")
arcpy.PackageLayer_management(listLayers, 'packagelayers.lpk', "PRESERVE", "CONVERT_ARCSDE", "#", "ALL", "ALL", "CURRENT")