Accessing the output of a Python script tool dialog ArcGIS 10.1
Well I couldn't work out how to access the outputs of the script tool from the python addin, but i have achieved the next best thing which works for me. Which was to pass the list from the script in the script tool dialog to a list in the python add in tool. By importing the python add in tool into the script for the script tool I was able to access the list variable.
import pythonaddins parameterList =  pythonaddins.GPToolDialog('Toolbox','PythonDialogTool')
import PythonAddinToolbar #get parameters from dialog para1 = arcpy.GetParameterAsText(0) para2 = arcpy.GetParameterAsText(1) para3 = arcpy.GetParameterAsText(2) para4 = arcpy.GetParameterAsText(3) para5 = arcpy.GetParameterAsText(4) para6 = arcpy.GetParameterAsText(5) paraList = [para1,para2,para3,para4,para5] PythonAddinToolbar.parameterList = paraList
Another option is to exchange parameters by making use of environment variables. However, this works only for strings.
Set an environment variable in the add-in code:
os.environ['TOOLNAME_VAR'] = 'abc'
Read the environment variable in the script tool code:
param = os.environ['TOOLNAME_VAR']