Hi,
is this possible to pass User Parameter into function argument as a second argument inside PythonCaller ?
Putting it like that, does not work:
def processFeature(feature, FME_MacroValues['SomeUserParameter']):
Thanks,
Submi
Hi,
is this possible to pass User Parameter into function argument as a second argument inside PythonCaller ?
Putting it like that, does not work:
def processFeature(feature, FME_MacroValues['SomeUserParameter']):
Thanks,
Submi
Best answer by david_r
While you can definitely do what @larry suggests, I'm not sure I see the point since "SomeUserParameter" will always be a constant (parameters cannot change value after the workspace is launched). In fact, I think it's just more likely to confuse those reading your code later.
I'd rather do something like
import fme
import fmeobjects
def processFeature(feature):
p = FME_MacroValues['SomeUserParameter']
print p
At least then everybody should be able to understand your code without wondering if there's a trick involved :-)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.