07-30-2025, 05:53 AM
Hi Everyone ,
I have a question regarding the use of Python programs within a RoboDK station. Specifically, I would like to know if it is possible for one Python program to call another within the same station.
In my current setup, I have created two separate Python programs—Program A and Program B—within the station. My intention is to call Program B from within Program A using the RunProgram() function. However, despite implementing this approach, Program B does not seem to execute as expected.
Could you please advise whether this method is supported, or if there is an alternative recommended approach to achieve this functionality?
Thank you very much for your assistance.
Best regards
Tyler
I have a question regarding the use of Python programs within a RoboDK station. Specifically, I would like to know if it is possible for one Python program to call another within the same station.
In my current setup, I have created two separate Python programs—Program A and Program B—within the station. My intention is to call Program B from within Program A using the RunProgram() function. However, despite implementing this approach, Program B does not seem to execute as expected.
Could you please advise whether this method is supported, or if there is an alternative recommended approach to achieve this functionality?
Thank you very much for your assistance.
Code:
my_prog = RDK.Item("ProgramB",ITEM_TYPE_PROGRAM_PYTHON)
print(f"{my_prog}")
if my_prog.Valid():
my_prog.RunProgram()
print("Run Program")
else:
print("Not Found")
Best regards
Tyler