I am trying to run a script which accesses the project and does manipulations to it. This is run through command line. When I run it with --noUI option projects.primary returns None in the script.
It runs fine when run with UI. Am I missing something here.
It can be recreated with the project and script attached and the following command:
First you can try to put the at the end of the parameters, in the case the order of the parameters causes your problem.
If you always open the same project why not open the project from within the python script. When you have to open different projects, you can open the project from within the python script but use the parameter to transfer the project path to the script.
BR
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to run a script which accesses the project and does manipulations to it. This is run through command line. When I run it with --noUI option projects.primary returns None in the script.
It runs fine when run with UI. Am I missing something here.
It can be recreated with the project and script attached and the following command:
CodesysTest.zip [38.9 KiB]
Hi Shabroz.Gill.
First you can try to put the at the end of the parameters, in the case the order of the parameters causes your problem.
If you always open the same project why not open the project from within the python script. When you have to open different projects, you can open the project from within the python script but use the parameter to transfer the project path to the script.
BR
Martin