Every exemple of python caller I see would only modify attributes or add new attributes to each input feature. Is it possible to output new features or more features than were received by duplicating some inputs ?
Solved
create new features within a python caller
Best answer by jeroenstiers
Hi @vchalmel
Yes, that is possible indeed. The code below allows you to create a new feature.
You can output this feature by using the second line of the sample.
newFeature = fmeobjects.FMEFeature()
self.pyoutput(newFeature)
This code only works when using the object-implementation (so not the function-implementation) of a PythonCaller. In the function-implementation, the feature entering the PythonCaller is outputted automatically.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.