Skip to main content
Open

Python API: a better method for retrieving parameters

Related products:Transformers
  • August 10, 2021
  • 1 reply
  • 4 views
siennaatsafe
virtualcitymatt
danilo_fme
lifalin2016
warrendev
+1
  • siennaatsafe
    siennaatsafe
  • virtualcitymatt
    virtualcitymatt
  • danilo_fme
    danilo_fme
  • lifalin2016
    lifalin2016
  • warrendev
    warrendev
  • janb

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

virtualcitymatt
Celebrity
Forum|alt.badge.img+36

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings