<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to add lib by using Script in CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/</id><updated>2020-02-27T14:44:39.820000Z</updated><subtitle>Recent posts to add lib by using Script in CoDeSys</subtitle><entry><title>add lib by using Script in CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/?limit=25#8dcd" rel="alternate"/><published>2020-02-27T14:44:39.820000Z</published><updated>2020-02-27T14:44:39.820000Z</updated><author><name>hhz</name><uri>https://forge.codesys.com/u/hhz/</uri></author><id>https://forge.codesys.comae638027dd3b6d7325dbc80cbea05d8418a54631</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK, the problem was now clean: some of lib can only use method "add_library" but not "add_placeholder".&lt;br/&gt;
But was is difference between library and placehoder. Have any idea/description?&lt;/p&gt;
&lt;p&gt;BR.&lt;br/&gt;
Huizong&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>add lib by using Script in CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/?limit=25#694a" rel="alternate"/><published>2020-02-27T14:44:39.294000Z</published><updated>2020-02-27T14:44:39.294000Z</updated><author><name>hhz</name><uri>https://forge.codesys.com/u/hhz/</uri></author><id>https://forge.codesys.comeb25ef4d4f8bf5d35a6738674b5724a6953865c0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;thanks for your  reply!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
Which version of CODESYS do you use?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;CoDeSYs v3.5 SP11 was used.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
Does the problem also occure if you manually add the placeholder after the python script has added the library to the library repository?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;manually add the placeholder has not this problem before and after the python script has added the library. The error is not for all lib occurred. For example, it works well, when i add lib "Util". But adding lib "CAA Type Extern", problem occurred. &lt;/p&gt;
&lt;p&gt;Additional infor.： The same issue can be reproduced with Script function "add_library" &lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
hhz&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>add lib by using Script in CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/?limit=25#4aec" rel="alternate"/><published>2020-02-27T14:44:37.784000Z</published><updated>2020-02-27T14:44:37.784000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.comeafd208982d992135da7e59377ff9c8553ef04ee</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi hhz.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;hhz hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
The lib was not correctly added, just shown a error in Message windows "Could not open library 'testlib'. (Reason: The placeholder library "testlib" could not be resolved.)"&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which version of CODESYS do you use?&lt;/p&gt;
&lt;p&gt;Does the problem also occure if you manually add the placeholder after the python script has added the library to the library repository?&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>add lib by using Script in CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/8dd2dc30e4/?limit=25#1635" rel="alternate"/><published>2020-02-27T14:44:37.239000Z</published><updated>2020-02-27T14:44:37.239000Z</updated><author><name>hhz</name><uri>https://forge.codesys.com/u/hhz/</uri></author><id>https://forge.codesys.com363873bdb2d9ebfd5c9c94593f6028cafe3d0da8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;i want to add lib in placeholder by using following script:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;Library_Manager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_placeholder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;"testlib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="ss"&gt;"testlib, 1.1 (xxx xxx GmbH)"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here Library_Manager is a  IScriptLibManObject. and "testlib" is the name of library "testlib.library", which was pre installed by Script :&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;librepository&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;librarymanager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;repositories&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;librarymanager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;install_library&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="ss"&gt;"C:\testlib.library"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;librepository&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The lib was not correctly added, just shown a error in Message windows "Could not open library 'testlib'. (Reason: The placeholder library "testlib" could not be resolved.)"&lt;/p&gt;
&lt;p&gt;Any idea or solution?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>