fc = arcpy.GetParameterAsText(0) arcpy.MakeFeatureLayer_management(fc, arcpy.Describe(fc).name + "_test")
test_lyr = arcpy.Describe(fc).name + "_test" mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] # choose the correct DataFrame lyr = arcpy.mapping.Layer(test_lyr) # insert your layer-name arcpy.mapping.AddLayer(df, lyr, "TOP") # choose position in TOC arcpy.RefreshTOC()
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.