Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generates a feature layer based on previously set args
- arcpy.MakeFeatureLayer_management(outShp, outName, "", "", "")
- # Dumby mxd for the output layer to reside
- mxd = arcpy.mapping.MapDocument("C:\TEMP\parser.mxd")
- dframe = arcpy.mapping.ListDataFrames(mxd)[0]
- layer = arcpy.mapping.Layer(outName)
- arcpy.mapping.AddLayer(dframe, layer, "AUTO_ARRANGE")
- lyrLst = arcpy.mapping.ListLayers(mxd, outName, dframe)[0]
- layer.description = outName
- arcpy.PackageLayer_management(lyrLst, outLpk, "PRESERVE", "CONVERT_ARCSDE", "", ALL", "ALL", "ALL", "", "Footprint", "Bounding")
- mxd.save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement