Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arcpy.mapping.ListLayers(mxd,"FILTER",df)[0].
- import arcpy
- raster = arcpy.GetParameterAsText(0)
- outPDF = arcpy.GetParameterAsText(1)
- hill_bool = arcpy.GetParameterAsText(2)
- mxd = arcpy.mapping.MapDocument("CURRENT")
- df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
- hillshade = arcpy.mapping.ListLayers(mxd, "hillshade", df)[0]
- hillshade.visible = hill_bool
- tmplist = ["Januar","Februar","Maerz","April","April",
- "Mai","Juni","Juli","August","September","Oktober","November","Dezember"]
- monlist = arcpy.mapping.ListLayers(mxd, tmplist ,df) #Select only the months
- addLayer = arcpy.mapping.Layer(r"C:PythonLegende_2.lyr")
- arcpy.mapping.MoveLayer(df, monlist[:-1],hillshade, "AFTER")
- for element in monlist:
- element.visible = "TRUE"
- arcpy.ApplySymbologyFromLayer_management("","addLayer")
- if hillshade.visible = "TRUE": #<<< ???
- element.transparency = 35
- arcpy.RefreshActiveView()
- ...
- #...align Legend and other objects -> ExportToPDF`
- arcpy.mapping.ExportToPDF(mxd, outPDF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement