Created
January 11, 2016 19:28
-
-
Save BrunoCaimar/44889270e3244ba8434c to your computer and use it in GitHub Desktop.
Add Layer on MXD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_layer_on_mxd(layer_path): | |
""" | |
Adiciona uma layer ao mxd atual. | |
""" | |
mxd = arcpy.mapping.MapDocument("CURRENT") | |
data_frames = arcpy.mapping.ListDataFrames(mxd, "*")[0] | |
newlayer = arcpy.mapping.Layer(layer_path) | |
arcpy.mapping.AddLayer(data_frames, newlayer, "BOTTOM") | |
add_layer_on_mxd("IN_MEMORY\FeatureCabos_T2UVATGGKJ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment