Created
June 12, 2017 14:31
-
-
Save green3g/b8d75c0001aa932526412dbadac7d45c to your computer and use it in GitHub Desktop.
ArcGIS Project Map Parameter
This file contains 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 updateParameters(self): | |
"""Modify the values and properties of parameters before internal | |
validation is performed. This method is called whenever a parameter | |
has been changed.""" | |
if self.params[0].altered and self.params[0].value != "": | |
projectPath = self.params[0].value | |
aprx = arcpy.mp.ArcGISProject(projectPath) | |
# Get list of maps in project | |
map_list = [m.name for m in aprx.listMaps()] | |
# Populate Map param | |
self.params[1].filter.list = map_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment