Skip to main content
Question

How to write an attribute into a new attribute with Pythoncaller


Forum|alt.badge.img

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

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • October 9, 2019

Have you exposed the item_no attribute?

 


Forum|alt.badge.img
  • Author
  • October 9, 2019
ebygomm wrote:

Have you exposed the item_no attribute?

 

Líra utca - gyalogos híd


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings