<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Updating device version</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/</id><updated>2020-02-27T14:48:49.024000Z</updated><subtitle>Recent posts to Updating device version</subtitle><entry><title>Updating device version</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/?limit=25#34a3" rel="alternate"/><published>2020-02-27T14:48:49.024000Z</published><updated>2020-02-27T14:48:49.024000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com463ce8226cfb9fd65546e156d0e14189fc396e41</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Jörg.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;JöLa hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Is there a possibility to get the library parameters before uninstalling the old library?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can get the list of parameters for a library from the property "parameters" from a library reference which you get from the LibMan object.&lt;/p&gt;
&lt;p&gt;This example code shows the list of existing parameters of the library reference from the LibMan object and also change some for my test library:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;library_reference&lt;/span&gt;.&lt;span class="nv"&gt;parameters&lt;/span&gt;
   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;params&lt;/span&gt;:
      &lt;span class="nv"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;param: %s =&amp;gt; %s&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;, &lt;span class="nb"&gt;params&lt;/span&gt;[&lt;span class="nv"&gt;name&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt;.&lt;span class="nv"&gt;endswith&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;_SIZE&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;:
         # &lt;span class="nv"&gt;set&lt;/span&gt; &lt;span class="nv"&gt;the&lt;/span&gt; &lt;span class="nv"&gt;parameter&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;new&lt;/span&gt; &lt;span class="nv"&gt;value&lt;/span&gt;
         &lt;span class="nb"&gt;params&lt;/span&gt;[&lt;span class="nv"&gt;name&lt;/span&gt;] &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;120&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
         &lt;span class="nv"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;new value of param: %s =&amp;gt; %s&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;, &lt;span class="nb"&gt;params&lt;/span&gt;[&lt;span class="nv"&gt;name&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;JöLa hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Is there perhaps a new ScriptEngine 3.5.9.0 with this  or interface?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;ILibMananager is not the LibMan object but the library repository manager of CODESYS. Get the LibMan object of your application or use the one of the Pool and remove the old library reference and add a new one with the required version.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Updating device version</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/?limit=25#07dc" rel="alternate"/><published>2020-02-27T14:48:48.460000Z</published><updated>2020-02-27T14:48:48.460000Z</updated><author><name>JöLa</name><uri>https://forge.codesys.com/u/joela/</uri></author><id>https://forge.codesys.comd0e27c77f038b40fe54a5f896296b0bc0d94f28c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello!&lt;br/&gt;
Updating a device is clear, but how can i replace/update a library to a defined version (not to newest)?&lt;br/&gt;
A look into the script documentation (3.5.8.0) there is only an  and an .&lt;br/&gt;
Using this both methods (first uninstall and then install) all my library parameters in the project are gone (default values).&lt;/p&gt;
&lt;p&gt;Is there a possibility to get the library parameters before uninstalling the old library?&lt;br/&gt;
Is there perhaps a new ScriptEngine 3.5.9.0 with this  or interface?&lt;/p&gt;
&lt;p&gt;To set the libraries to the newest version i use the interface ond open the project with the .&lt;br/&gt;
But here i get DragDrop register exceptions dialogs like in the attachment after calling . &lt;br/&gt;
See here &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=18&amp;amp;t=6860&amp;amp;hilit=library+update&amp;amp;p=14769&amp;amp;lan=en" rel="nofollow"&gt;http://forum.codesys.com/viewtopic.php?f=18&amp;amp;t=6860&amp;amp;hilit=library+update#p14769&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Jörg&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: DragDrop" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2386"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Updating device version</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/?limit=25#367f" rel="alternate"/><published>2020-02-27T14:48:47.905000Z</published><updated>2020-02-27T14:48:47.905000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.comc86f11bbc302b82d3f3379bc36b25faa42771a1a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi pavo.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;pavo hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Is it possible to update a version of a device/library in the project by Python?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes and yes.&lt;/p&gt;
&lt;p&gt;For the update of a device you use the methods  of the already existing device object. You need the device ID, the device type, the version and, if required, the module ID of the new device. See .&lt;/p&gt;
&lt;p&gt;For the update of a library you need to find the library manager object and replace the library entry in it. That's the way to do it for managed libraries. For a placeholder you can change the default resolution. See .&lt;/p&gt;
&lt;p&gt;Some libraries are added and managed by other objects in the project. For example the PLC.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Updating device version</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/80489dbc64/?limit=25#46be" rel="alternate"/><published>2020-02-27T14:48:46.353000Z</published><updated>2020-02-27T14:48:46.353000Z</updated><author><name>pavo</name><uri>https://forge.codesys.com/u/pavo/</uri></author><id>https://forge.codesys.comac7f31d49de9839daeb54dccc4c9cf121d30e81d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is it possible to update a version of a device/library in the project by Python?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>