Program vs SubProgram vs Routine in .NET

Hopefully this is a basic question to answer, but I couldn’t find the answer in any of the tutorials, or an existing forum topic.

With the .NET API, you can retrieve a list of programs for a given IRobotExecutor, and create a new one, with IRobotExecutor::CreateProgram(string). When I do this, I can confirm that the result is !=null, but I cannot see in the GUI tree any of these new programs. I can only see the default (“Main”), and the list of “Subprograms”

The IProgram interface has the AddRoutine(string) method. If I call this on the default (“Main”) IProgram, I can see these routines populated in the “Subprogram” panel, where it is listed in the same level of hierarchy as “Main”, even though it appears as though “Main” in the backend exists at the higher-level.

So I guess my question is: is there a standard use case for maintaining multiple IPrograms with a single IRobotExecutor? If so, how does one access them through the standard GUI, or is it necessary to create new GUI elements to find them? Is it more conventional to maintain a single IProgram, and simply manipulate SubPrograms/Routines within it? Is there any different between a SubProgram or Routine in the Visual-Components ecosystem, or are these synonymous?


I think the need to really have multiple programs just has never been realized and thus the UI doesn’t support them. Likely nothing else like post processors and scripts work with more than one program either.

So just use a single program and routines in it.

Thank you for your response. So let’s say you are doing some A/B testing, and want to test two different strategies for a robot program, mature/maintain them both, track metrics, etc. In order to accomplish this within the UI as-is, each of these would be a sub-program, and to switch between them, the “Main” program would actually have to be modified to call one vs the other, there isn’t a way to select a currently active program, or something like that?

The standard use case is to maintain a single IProgram and manipulate SubPrograms/Routines within it. Multiple IPrograms with a single IRobotExecutor are not commonly used, and the GUI doesn’t fully support them. Stick to one IProgram and organize your logic using SubPrograms/Routines within it. They are synonymous in the Visual Components ecosystem. Can dog eat