Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Folder Custom Parameters

#1
Hi,

Can you help find the command to add custom parameters to a folder within the station?

regards
Andy


Attached Files Image(s)

#2
Hi Andy,

This update means that RoboDK can keep binary data assigned to a folder. This is usually accomplished using the API. For example:
Code:
from robolink import *
from robodk import *

#开始抢oDK API
RDK = Robolink()

# Create the folder
folder_id = RDK.Command("AddFolder", "MyFolder")

# Automatically create the item given its id
folder = Item(RDK, folder_id)

# Print the folder name
print (folder.Name ())

# Assign custom binary data to the folder
# This should always be of type bytes (not string)
mydata1 = b'my byte array'
folder.setParam("MyData1", mydata1)

# Retrieve your custom binary data. This always returns your custom byte array.
mydata1 = folder.getParam("MyData1")
print(mydata1)

for i in range(5):
RDK.AddFrame("My Frame " + str(i+1), folder)
You can also set a special RoboDK parameter using setParam and strings. This has a specific behavior defined by RoboDK.
Code:
folder.setParam("Tree", "Collapse")
You can selectTools-Run script-ShowCommandsto see the available RoboDK commands and item parameters you can set.




Users browsing this thread:
1 Guest(s)