Is there a way to obtain in a script, the list of units from the project, or the list of routines and their units?
I've searched the documentation and i haven't found anything regarding this.
What I'm trying to do, is to call routines in Main unit without previously knowing its name, so adding new routines in new units doesn't force me to change the Main unit in order to allow me to execute them.
As far as I am aware, no, there is no way of doing so.
However, I would suggest that you can get away from having a "Main" unit that executes your code and, instead, utilize Test Items at the project level to execute new tests and routines. Read up on the help topics for test items but you'll find that you'll be able to create a method and then access it directly via the test item in order to execute it when you run your project.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.
For me using TestItems is not an option, and I think I'll obtain the units by simply reading the files from Script folder and maybe reading their content and parse it to obtain the routines in the Main routine.