First; I know I ask a lot in here, but I hope it is okay. After all you can just see it as interest in your product.
I am making a script to automatically open a CoDeSys project and compile it. I would like to write the referenced libraries to a log file to be able to track exactly what was build.
My first test includes just printing the libraries to message window, but I see here that only the library name and "chosen version" is showed; not the effective version. Is there a way to also get the effective version showed for libraries set to "newest"?
Sample script:
proj=projects.primaryobjects=proj.get_children(recursive=True)forcandidateinobjects:
  ifcandidate.is_libman: Â
    libs=candidate.get_libraries(recursive=True)
    foriteminlibs:
      print(item)
M.Schaber hat geschrieben:
Currently, the effective version of a library is not readable via script.
I created the improvement CDS-30948 in our jira database.
Is there an update to this improvement request? (So far) I have no access to jira.
As fallback solution, I would parse an export. As this is cumbersome, I would like avoid this.
Regards and Thanks
Torsten Knodt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
torsknod hat geschrieben:
Gibt es hierzu etwas neues? Auf JIRA habe ich leider /bisher) keinen Zugriff.
"Notfalls" würde ich über das Parsen eines Exports arbeiten. Da dies umständlich ist, möchte ich es gerne vermeiden.
Der Jira wurde mit CODESYS V3.5 SP5 umgesetzt.
Ich habe mal schnell was zusammengeschrieben:
proj=projects.primaryobjects=proj.get_children(recursive=True)forcandidateinobjects:
  ifcandidate.is_libman:
    forlibrefiniter(candidate):
      iflibref.is_placeholder:
        print"placeholder: %s: %s => %s"%(libref.name, libref.default_resolution, libref.effective_resolution)
      eliflibref.is_managed:         Â
        print"library: %s: %s"%(libref.name, libref.managed_library.version)
      else:         Â
        print"library: "+libref.name
BTW: Dies ist ein englisches Forum. Das nächste mal bitte in Englisch. Danke.
BR
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
proj=projects.primaryobjects=proj.get_children(recursive=True)forcandidateinobjects:
  ifcandidate.is_libman:
    forlibrefiniter(candidate):
      iflibref.is_placeholder:
        print"placeholder: %s: %s => %s"%(libref.name, libref.default_resolution, libref.effective_resolution)
      eliflibref.is_managed:         Â
        print"library: %s: %s"%(libref.name, libref.managed_library.version)
      else:         Â
        print"library: "+libref.name
BTW: Dies ist ein englisches Forum. Das nächste mal bitte in Englisch. Danke.
Thanks for the fast answer. I have edited my post to be in english. I have no clue why I have answered in german.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
First; I know I ask a lot in here, but I hope it is okay. After all you can just see it as interest in your product.
I am making a script to automatically open a CoDeSys project and compile it. I would like to write the referenced libraries to a log file to be able to track exactly what was build.
My first test includes just printing the libraries to message window, but I see here that only the library name and "chosen version" is showed; not the effective version. Is there a way to also get the effective version showed for libraries set to "newest"?
Sample script:
Output looks something like this:
As you see the version for some libraries are * whereas I can see that IoStandard is 3.5.1.0.
Best regards,
Frank
Originally created by: M.Schaber
Hi, Frank,
Currently, the effective version of a library is not readable via script.
I created the improvement CDS-30948 in our jira database.
HTH,
Markus
Hi Markus,
Ok. Thanks for adding it to your Jira.
Best regards,
Frank
Is there an update to this improvement request? (So far) I have no access to jira.
As fallback solution, I would parse an export. As this is cumbersome, I would like avoid this.
Regards and Thanks
Torsten Knodt
Hi torsknod.
Der Jira wurde mit CODESYS V3.5 SP5 umgesetzt.
Ich habe mal schnell was zusammengeschrieben:
BTW: Dies ist ein englisches Forum. Das nächste mal bitte in Englisch. Danke.
BR
Martin
BTW: Dies ist ein englisches Forum. Das nächste mal bitte in Englisch. Danke.
Thanks for the fast answer. I have edited my post to be in english. I have no clue why I have answered in german.