Creating a UR5e program (with program tree) with Python


We have a UR5e robot that we run mainly with script-files that we create with a Python-algorithm. This approach works great in most cases but sometimes we miss the option to select a waypoint from the program tree, and continue the program from this point.

My question is if there is a way to give the operator a possibility to choose from which position to start the program in Polyscope, without actually creating the program via the pendant? For example: Is it possible to create Polyscope-programs with URscript (meaning that the program tree and so on is visible on screen)?

Thanks in advance