Skip to main content

Hello, I am pretty new to all of this, so I am not even sure in which category to post my question. I have created a small FME Workspace containing a Reprojector. Now I want to include this tool into a Python Script already containing different other functions, and it should be possible to select which data to transform as well as the coordinate systems used. I tried to use the FMEWorkspaceRunner(), but it is only possible to state the Source and Destination Dataset, not to use the FMEReprojector.setCoordinateSystems() funktion. The same goes for calling the workspace over the command prompt with fme.exe it only accepts parameters for source and destination. As the workspace contains some other elements as well I also want to use the existing workspace and not to create reader, writer and all fmeobjects in the python skript every time the function is called.

Hi @styx_a38​,

In Workbench, please open the Properties of the Reprojector transformer, then click the triangle button beside the Source Coordinate System box. From the drop down menu, select User Parameter - Create User Parameter. Accept the defaults settings in the dialog and click OK to accept. Do the same with the Destination Coordinate System box.

Now that you have linked the Reprojector settings to the User Parameters, they can be set when running the workspace on the command line or in the WorkspaceRunner(), by setting the parameter SOURCE to the source coordinate system name, and the parameter DEST to the destination coordinate system name.

If you use the WorkspaceRunner.promptRun() method, the parameters will be included in the pop-up dialog.


Reply