beginner for TOPs
I wanna know how to add attribute for each index,for example,I have a string array,and i wanna gave array element for each index.
Help pls
Python create attribute
2291 2 1- zhaoxijiucao
- Member
- 10 posts
- Joined: Nov. 2018
- Offline
- tpetrick
- Staff
- 586 posts
- Joined: May 2014
- Offline
You can use a Python Script node to set string array attributes. For example:
If you're on 18.0, you'll probably want to set the Evaluate Script During parameter to “Generate” as well, so the attributes are created during the work item generation step.
work_item.setStringAttrib("name", "value", 0) work_item.setStringAttrib("name", "other_value", 1) work_item.setStringAttrib("name", "third_value", 2)
If you're on 18.0, you'll probably want to set the Evaluate Script During parameter to “Generate” as well, so the attributes are created during the work item generation step.
- zhaoxijiucao
- Member
- 10 posts
- Joined: Nov. 2018
- Offline
tpetrickSir,Hou.attribype.global can be translate what type of PDG attributr?
You can use a Python Script node to set string array attributes. For example:work_item.setStringAttrib("name", "value", 0) work_item.setStringAttrib("name", "other_value", 1) work_item.setStringAttrib("name", "third_value", 2)
If you're on 18.0, you'll probably want to set the Evaluate Script During parameter to “Generate” as well, so the attributes are created during the work item generation step.
-
- Quick Links