Skip to main content
Question

How to write an attribute into a new attribute with Pythoncaller

  • October 9, 2019
  • 2 replies
  • 37 views

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 9, 2019

Have you exposed the item_no attribute?

 


Forum|alt.badge.img
  • Author
  • 14 replies
  • October 9, 2019

Have you exposed the item_no attribute?

 

Líra utca - gyalogos híd