I tried this by doing like below ( this is just for testing purposes snippet ) :
Code:
if (robodk_instance_->Connected())
{
( ..... )
robot_instance_ = std::make_shared<RoboDK_API::Item>(robodk_instance_->getItem(QString::fromStdString(remote_rdk_patner_->RobotName_), RoboDK_API::RoboDK::ITEM_TYPE_ROBOT));
auto robot_program_python_ = std::make_shared<RoboDK_API::Item>(robodk_instance_->getItem(QString::fromStdString("InitParam"), RoboDK_API::RoboDK::ITEM_TYPE_PROGRAM_PYTHON));
robot_program_python_->RunProgram();
( ..... )
}
where 'InitParam' is a pythin script. When I run this script from RoboDK perspective it works. Script is going to show window used for providing parameters for "worker" script. So executing this via RDK API i would expect to see the same behavior but unfortunately i don't see anything except some strange effect like I would run 'worker' script - maybe its side effect of ...->RunProgram() ...
To be honest i'm not sure if RunProgram() can execute selected python script or its just dedicated for running generated programs.
So my question is if just taking/selecting item via .Item(... ) can should run python script or there is additional call required ( like RunProgram or something else ) ?