AnsweredAssumed Answered

Python variables not working in pro sdk

Question asked by nicholas.ferri@aecom.com_aecomtraining on Jan 3, 2019
Latest reply on Jan 3, 2019 by xander_bakker

I am using the  CallScriptFromNet pro sdk community sample to run a python script in Pro via an addin. If i add the script through pro in a toolbox it runs fine but if i build an addin that runs it from the CallScriptFromNet example it errors on the "CURRENT" value of Is there something in the way it's being run from an addin that makes the python script run differently? Has anyone found a solution for this?



CallScriptFromNet example:


My Updated .py Script:

import sys

import arcpy

from arcpy import env


import os

aprx ="CURRENT")

aprxFolder = aprx.homeFolder

mname =

m = aprx.listMaps(mname)[0]



arcgisscripting._mapping.ArcGISProject(*gp_fixargs((aprx_path,), True))