Is there any possibility to get/read the profile of a project before we open it with Python?
We have different projects made with different version of COEDSYS. For the start of a Python script we have to know the profile "--profile="CoDeSys V3.4 SP3 Patch 1" of the project. How can we read the profile of a saved project?
Thanks pavo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2016-05-12
Originally created by: M.Schaber
Hi,
pavo hat geschrieben:
Is there any possibility to get/read the profile of a project before we open it with Python?
We have different projects made with different version of COEDSYS. For the start of a Python script we have to know the profile "--profile="CoDeSys V3.4 SP3 Patch 1" of the project. How can we read the profile of a saved project?
Thanks pavo
Currently, there's no official way to access the profile information of a project without opening it.
As we have backwards compatibility features (compiler version settings, storage format etc.), it should be possible to open and process older projects with newer versions.
If you want to get into the deep waters of unsupported code (which might break with any future version of CODESYS), you could try to parse it out of the project. The project is basically a zip file, and the profile information is included there (in the files profile.auxiliary). In the header of the file, the profile name is also encoded (in UTF-16, AFAICS). So with some reverse engineering, you could write your own code to parse profile name out of the file header...
HTH,
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any possibility to get/read the profile of a project before we open it with Python?
We have different projects made with different version of COEDSYS. For the start of a Python script we have to know the profile "--profile="CoDeSys V3.4 SP3 Patch 1" of the project. How can we read the profile of a saved project?
Thanks pavo
Originally created by: M.Schaber
Hi,
Currently, there's no official way to access the profile information of a project without opening it.
As we have backwards compatibility features (compiler version settings, storage format etc.), it should be possible to open and process older projects with newer versions.
If you want to get into the deep waters of unsupported code (which might break with any future version of CODESYS), you could try to parse it out of the project. The project is basically a zip file, and the profile information is included there (in the files profile.auxiliary). In the header of the file, the profile name is also encoded (in UTF-16, AFAICS). So with some reverse engineering, you could write your own code to parse profile name out of the file header...
HTH,
Markus