Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. # Generates a feature layer based on previously set args
  2. arcpy.MakeFeatureLayer_management(outShp, outName, "", "", "")
  3.  
  4. # Dumby mxd for the output layer to reside
  5. mxd = arcpy.mapping.MapDocument("C:\TEMP\parser.mxd")
  6. dframe = arcpy.mapping.ListDataFrames(mxd)[0]
  7. layer = arcpy.mapping.Layer(outName)
  8. arcpy.mapping.AddLayer(dframe, layer, "AUTO_ARRANGE")
  9. lyrLst = arcpy.mapping.ListLayers(mxd, outName, dframe)[0]
  10. layer.description = outName
  11.  
  12. arcpy.PackageLayer_management(lyrLst, outLpk, "PRESERVE", "CONVERT_ARCSDE", "", ALL", "ALL", "ALL", "", "Footprint", "Bounding")
  13. mxd.save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement