AnsweredAssumed Answered

Create a drop down in python code

Question asked by wwmiller68 Champion on Sep 1, 2015
Latest reply on Sep 1, 2015 by wwmiller68

Is it possible to create a drop down in python code? You could in VBA, I don't remember what's terminology.example below.

This code will size and position an element on the map layout. What i would like is for the element type to be a drop down list for the various types.

def sizeposElm(elmName,elmType,elmWidth,elmHeight,elmX,elmY):
    """Element Name, Element Type, Element Width, Element Height, X Position, Y Position"""
    elm = arcpy.mapping.ListLayoutElements(mxd, elmType, elmName)[0]
    elm.elementWidth = elmWidth
    elm.elementHeight = elmHeight
    elm.elementPositionX = elmX
    elm.elementPositionY = elmY
    del elm