Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. arcpy.mapping.ListLayers(mxd,"FILTER",df)[0].
  2.  
  3. import arcpy
  4. raster = arcpy.GetParameterAsText(0)
  5. outPDF = arcpy.GetParameterAsText(1)
  6. hill_bool = arcpy.GetParameterAsText(2)
  7.  
  8. mxd = arcpy.mapping.MapDocument("CURRENT")
  9. df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
  10. hillshade = arcpy.mapping.ListLayers(mxd, "hillshade", df)[0]
  11. hillshade.visible = hill_bool
  12.  
  13. tmplist = ["Januar","Februar","Maerz","April","April",
  14. "Mai","Juni","Juli","August","September","Oktober","November","Dezember"]
  15. monlist = arcpy.mapping.ListLayers(mxd, tmplist ,df) #Select only the months
  16. addLayer = arcpy.mapping.Layer(r"C:PythonLegende_2.lyr")
  17. arcpy.mapping.MoveLayer(df, monlist[:-1],hillshade, "AFTER")
  18.  
  19. for element in monlist:
  20. element.visible = "TRUE"
  21. arcpy.ApplySymbologyFromLayer_management("","addLayer")
  22. if hillshade.visible = "TRUE": #<<< ???
  23. element.transparency = 35
  24. arcpy.RefreshActiveView()
  25. ...
  26.  
  27. #...align Legend and other objects -> ExportToPDF`
  28. arcpy.mapping.ExportToPDF(mxd, outPDF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement