Hello!
I'm new to FME and I'm getting stupid about a simple task:
I want to take the second element of list I created and write it into a new attribute (X2), which doesn't work.
If I begin by grabbing the first element like this, it works:
import fmeobjects
class FeatureProcessor(object):
def input(self, feature):
feature.setAttribute("X2",feature.getAttribute('List{0}.X'))
self.pyoutput(feature)
However, If I change that code to start grabbing values by the second row (change the code to "feature.getAttribute('List{1}.X')", I get an empty output.
Can anyone help with this? Or is there any other solution that fits? Basically, I have an X-Coordinate-Attribute and I want that X-Coordinate to be substracted with the following X-Coordinate in the same attribute. I thought deleting the first element and then merging the resulting attribute to the original attribute would be the easiest solution.
Thank you!