In a Python Toolbox, I ask the user for 2 parameters, an input and output mxd:
After the user selects the first, I'd like to copy the input mxd path to the second parameter, something like this:
c:\temp\test.mxd
c:\temp\testCopy.mxd
I'm working in updateParameters, without success:
Thanks,
Glen
Code:
def getParameterInfo(self):
"""Define parameter definitions"""
param0 = arcpy.Parameter(
displayName="Input ArcMap Document",
name="in_mxd",
datatype="DEMapDocument",
parameterType="Required",
direction="Input")
param1 = arcpy.Parameter(
displayName="Output ArcMap Document",
name="out_mxd",
datatype="DEMapDocument",
parameterType="Required",
direction="Output")
c:\temp\test.mxd
c:\temp\testCopy.mxd
I'm working in updateParameters, without success:
Code:
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 self.params[0].value:
self.params[1].value = self.params[0].value
return
Glen