andyfox - 2021-06-07

I copied the code from;product=codesys;version= into a local file, "". When I open the project in the IDE and execute the script file, it prints six messages, as expected. When I run the script from the command line, I get an error. It doesn't matter if I precede the command with "start /wait" or run it from a batch/command file. My goal is to be able to run a single script against any arbitrary project, extracting information about the project.

Here is the command:
c:\Users\afox>"C:\Program Files\CODESYS\CODESYS\Common\CODESYS.exe" --profile='CODESYS V3.5 SP16 Patch 1' --project='C:\Users\afox\Projects\SampleProject.project' --noUI --runscript='C:\Users\afox\'

Here is the output:
c:\Users\afox>--- Printing the devices of the project: ---
Error: Running script 'C:\Users\afox\' caused exception System.MissingMemberException: Traceback (most recent call last):
File "C:\Users\afox\", line 34, in <module>
AttributeError: 'NoneType' object has no attribute 'get_children'</module>