Skip to main content

I would like to have a python caller execute a task on every attribute of a feature. How can I do this ?

Try something like

for attribute_name in feature.getAllAttributeNames():
    attribute_value = feature.getAttribute(attribute_name)
    print('{} = {}'.format(attribute_name, attribute_value))

See also https://docs.safe.com/fme/html/fmepython/api/fmeobjects/_feature/fmeobjects.FMEFeature.getAllAttributeNames.html#fmeobjects.FMEFeature.getAllAttributeNames


Reply