Skip to main content
Open

Python API: a better method for retrieving parameters

Related products:Transformers
  • August 10, 2021
  • 1 reply
  • 27 views

Forum|alt.badge.img+3

Today we can only make use of fme.macroValues[]. This is just a list of ALL parameters in the entire workspace. This no longer works at the moment you start creating custom transformers because the parameter name get extended with the name of the custom transformers it's embedded and you can retrieve those. The parameter content is also not escaped or evaluated when linked to an attribute.


A method maybe called fme.getParameter(<parameter name>) that has the same behaviour as the ParameterFetcher would do wonders.


Today we need to transform parameters into attributes, pass them through the PythonCaller and remove them again after the PythonCaller. Many additional steps that could be avoided and reduce performance and potential errors.

1 reply

itsmatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • August 10, 2021

Yeah this could be easier to use for sure. Creating attributes from the parameters is a bit of a pain