Skip to main content

Hi, 

Im trying to write a scripted parameter to allow only specified EPSG codes from the CsmapReprojector and apply the correct transformation . Based on a chosen source and destination CRS selected by the user a certain transformation is applied. This works fine, except when I try to use the <Auto> parameter. According to the documentation I should "Use the alternative blank string and NULL_FME respectively when passing in as an attribute." Unfortunately when I use "" as blank string in my script, the workspace fails because "Parameter 'TRANSFORMATION' must be given a value."

 

So how do I pass a "blank string" that triggers the automatic transformation in CsmapReprojector? My script looks something like this:

 

import fme

 

if fme.macroValuesa'SOURCE_CRS'] == 'EPSG:25833' and fme.macroValuesa'DEST_CRS'] == 'EPSG:31468':

  return 'DHDN_to_ETRS89/01_local_grid_FME (Reversed)'

else:

  return ""

 

Thank you for your help!

 

I found the solution - I had to uncheck the "Required" checkbox in the parameter options. Now I can pass an empty string in the script to trigger the automatic transformation.


Reply