In a Python startup script, I want to access Published parameters (to test whether an Oracle non-spatial Source Dataset connection is to our test or production environment). But the only examples I'm seeing in the documentation are for TCL startup scripts. If anyone has an example of accessing published parameters in a Python startup script that would be very helpful.
Page 1 / 1
Hi @ieukcoca, you can access a user parameter through fme.macroValues dictionary. e.g.
import fme
value = fme.macroValuesm'PARAM'] # Fetch the value of a user parameter called PARAM.
See these pages to learn more about the fme module use.
FME Workbench | Startup and Shutdown Python Scripts
Alternatively, a built-in global dictionary called FME_MacroValues can also be used.
value = FME_MacroValuess'PARAM']
Hi @ieukcoca, you can access a user parameter through fme.macroValues dictionary. e.g.
import fme
value = fme.macroValuesm'PARAM'] # Fetch the value of a user parameter called PARAM.
See these pages to learn more about the fme module use.
FME Workbench | Startup and Shutdown Python Scripts
Alternatively, a built-in global dictionary called FME_MacroValues can also be used.
value = FME_MacroValuess'PARAM']