Question

How to write an attribute into a new attribute with Pythoncaller

  • 9 October 2019
  • 2 replies
  • 1 view

Badge

Hello!

I am learning to use PythonCaller. I want to write an attribute into a new attribute. My code is running without fail, but it doesn't write the value (data) into the new attribute (item_no).

Where is my mistake?

 

class FeatureProcessor(object):
    def __init__(self):
        pass
    def input(self,feature):
        #for n in range(10):
        new_feature = feature.clone()
        data = feature.getAttribute('Data')
        new_feature.setAttribute('item_no', data)
        self.pyoutput(new_feature)
    def close(self):
        pass

2 replies

Userlevel 1
Badge +21

Have you exposed the item_no attribute?

 

Badge

Have you exposed the item_no attribute?

 

Líra utca - gyalogos híd

Reply