05-04-2023, 11:55 PM
I have an application where it would be useful to store custom information with RoboDK's target objects. (The information is related to the state of the broader machine when it reaches a certain target.) This way, the information would persist across saves of the .rdk workstation rather than becoming unlinked from the robolink.Item handles associated with those targets when my robolink.Robolink() connection closes.
To this end, I have two questions:
1. Is the robolink.Item.setValue() method in active use right now? Or might I be able to co-opt it? If it's user-available, does it work like a Python dict? (Or would you be able to share other additional documentation for the function of .setValue()?)
2. What is the character limit for robolink.Item.Name()? (As a plan-B, I can dump the data I want into a string and store it in the target name.)
As a workaround, it's possible to store the target handle / target data link as pickled data in a file, but it makes it tricky and somewhat indeterminate if targets get modified in the workstation without Python's knowledge.
To this end, I have two questions:
1. Is the robolink.Item.setValue() method in active use right now? Or might I be able to co-opt it? If it's user-available, does it work like a Python dict? (Or would you be able to share other additional documentation for the function of .setValue()?)
2. What is the character limit for robolink.Item.Name()? (As a plan-B, I can dump the data I want into a string and store it in the target name.)
As a workaround, it's possible to store the target handle / target data link as pickled data in a file, but it makes it tricky and somewhat indeterminate if targets get modified in the workstation without Python's knowledge.