MapExportTools.py
def updateParameters(self, parameters):
        """Modify the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed."""
        if parameters[0].altered:
            mxd = arcpy.mapping.MapDocument(str(parameters[0].value))
            totalPages = mxd.dataDrivenPages.pageCount
            exportList = []
            for page in range(1, totalPages + 1):
                mxd.dataDrivenPages.currentPageID = page
                pageField = mxd.dataDrivenPages.pageNameField.name
                pageName = mxd.dataDrivenPages.pageRow.getValue(pageField)
                exportList.append(str(page) + "-" + pageName)
            parameters[2].filter.list = exportList
        return
Modify the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed.
Modify the values and properties of parameters before internal
validation is performed.  This method is called whenever a parameter
has been changed.
Modify the values and properties of parameters before internal validation is performed . This method is called whenever a parameter has been changed .
def updateParameters(self, parameters):
        if parameters[0].altered:
            mxd = arcpy.mapping.MapDocument(str(parameters[0].value))
            totalPages = mxd.dataDrivenPages.pageCount
            exportList = []
            for page in range(1, totalPages + 1):
                mxd.dataDrivenPages.currentPageID = page
                pageField = mxd.dataDrivenPages.pageNameField.name
                pageName = mxd.dataDrivenPages.pageRow.getValue(pageField)
                exportList.append(str(page) + "-" + pageName)
            parameters[2].filter.list = exportList
        return
def updateParameters ( self , parameters ) : if parameters [ 0 ] . altered : mxd = arcpy . mapping . MapDocument ( str ( parameters [ 0 ] . value ) ) totalPages = mxd . dataDrivenPages . pageCount exportList = [ ] for page in range ( 1 , totalPages + 1 ) : mxd . dataDrivenPages . currentPageID = page pageField = mxd . dataDrivenPages . pageNameField . name pageName = mxd . dataDrivenPages . pageRow . getValue ( pageField ) exportList . append ( str ( page ) + "-" + pageName ) parameters [ 2 ] . filter . list = exportList return
Modify the values and properties of parameters before internal
validation is performed.
Modify the values and properties of parameters before internal validation is performed .
"""Modify the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed."""
self
parameters