10-17-2018, 04:25 AM
I am attempting to use Python to recreate a station that I have previously created using the RoboDK UI, and have run into an error whilst attempting to use setParam to change the file path of the station:
Specifically, I get the error "AttributeError: 'Item' object has no attribute 'setParam' when trying to change the path where the RDK file will be saved. Is someone able to enlighten me as to why setParam is not functioning? I am not sure if its a Python syntax thing, or I am attempting to use the API incorrectly...
Code:
def CreateStation():
station = RDK.ActiveStation()
station.setName('Python Test Station')
station.setParam ('FILE_OPENSTATION','C:/Users/RBE/Downloads')
RDK.Save('Python Test.rdk')
Specifically, I get the error "AttributeError: 'Item' object has no attribute 'setParam' when trying to change the path where the RDK file will be saved. Is someone able to enlighten me as to why setParam is not functioning? I am not sure if its a Python syntax thing, or I am attempting to use the API incorrectly...