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

Folder Custom Parameters


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


Attached Files Image(s)
Hi Andy,

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

# Start the RoboDK 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

# 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")

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. 
folder.setParam("Tree", "Collapse")
You can select Tools-Run script-ShowCommands to see the available RoboDK commands and item parameters you can set.

Users browsing this thread:
1 Guest(s)