<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Adding library manager to project</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/</id><updated>2020-02-27T14:50:22.190000Z</updated><subtitle>Recent posts to Adding library manager to project</subtitle><entry><title>Adding library manager to project</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/?limit=25#18cb" rel="alternate"/><published>2020-02-27T14:50:22.190000Z</published><updated>2020-02-27T14:50:22.190000Z</updated><author><name>Frank Jepsen</name><uri>https://forge.codesys.com/u/frank-jepsen/</uri></author><id>https://forge.codesys.comb3ce5ad70d3c2db9af5bff3c79441a7d028d7b23</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Markus,&lt;/p&gt;
&lt;p&gt;Ok. Thanks for the answer (and all your other support) anyway. I just went with having the PLCopenXML in a separate file. &lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Frank&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Adding library manager to project</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/?limit=25#acb4" rel="alternate"/><published>2020-02-27T14:50:21.421000Z</published><updated>2020-02-27T14:50:21.421000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com0a18e325eab1601c7f1a57dc6663d0d5a4155552</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;p&gt;Hi, Frank,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Frank Jepsen hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Thanks. It worked with import_xml function using the exported XML. &lt;br/&gt;
I have a little trouble using inline XML; how much of the xml is needed - the complete xml found in exported xml or can I use a shorter syntax? It would be great if you can provide a small example.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm not an PLCOpenXML expert, so I can't give a definitive answer to that question. Either you use try-and-error to find out which elements can be dropped, or maybe you check the PLCOpenXML Standard.&lt;/p&gt;
&lt;p&gt;HTH,&lt;br/&gt;
Markus&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Adding library manager to project</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/?limit=25#6462" rel="alternate"/><published>2020-02-27T14:50:19.844000Z</published><updated>2020-02-27T14:50:19.844000Z</updated><author><name>Frank Jepsen</name><uri>https://forge.codesys.com/u/frank-jepsen/</uri></author><id>https://forge.codesys.comc9706192ff1b84f4fc71c715ace7ed8c5dc064da</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Markus,&lt;/p&gt;
&lt;p&gt;Thanks. It worked with import_xml function using the exported XML. &lt;/p&gt;
&lt;p&gt;I have a little trouble using inline XML; how much of the xml is needed - the complete xml found in exported xml or can I use a shorter syntax? It would be great if you can provide a small example.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Frank&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Adding library manager to project</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/?limit=25#b7a9" rel="alternate"/><published>2020-02-27T14:50:19.269000Z</published><updated>2020-02-27T14:50:19.269000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com9e85ec750e9c30eeb347b4640428f0151c007c90</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;p&gt;Hi, Frank,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Frank Jepsen hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I am wondering if there is a way to add a library manager to a project using scripts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Currently, there's no direct way, but it is possible to add a library manager using import_native or import_xml. Just manually create one in an empty project and export it using "Project/Export..." or "Project/Export PLCOpenXML...", and then import that file on the application object.&lt;/p&gt;
&lt;p&gt;With import_xml, you can also provide the XML inline in the script as a string, without the need for a temporary file.&lt;/p&gt;
&lt;p&gt;HTH,&lt;br/&gt;
Markus&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Adding library manager to project</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/e3d4e7e97b/?limit=25#015b" rel="alternate"/><published>2020-02-27T14:50:17.654000Z</published><updated>2020-02-27T14:50:17.654000Z</updated><author><name>Frank Jepsen</name><uri>https://forge.codesys.com/u/frank-jepsen/</uri></author><id>https://forge.codesys.combec4820f81492adac1dceed42c6296dacc75c0be</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am wondering if there is a way to add a library manager to a project using scripts. I saw M.Schaber's example to find managers:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;Find&lt;/span&gt; &lt;span class="nv"&gt;all&lt;/span&gt; &lt;span class="nv"&gt;library&lt;/span&gt; &lt;span class="nv"&gt;managers&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;the&lt;/span&gt; &lt;span class="nv"&gt;project&lt;/span&gt;:
&lt;span class="nv"&gt;Code&lt;/span&gt;:
&lt;span class="nv"&gt;objects&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;proj&lt;/span&gt;.&lt;span class="nv"&gt;get_children&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;recursive&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;True&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;candidate&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;objects&lt;/span&gt;:
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;candidate&lt;/span&gt;.&lt;span class="nv"&gt;is_libman&lt;/span&gt;:   
        &lt;span class="nv"&gt;print&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;candidate&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I also see the "add_library" in API help, but this methods is for libman objects, so if I have a project without libman I need to create one first. Any tips on how to do this?&lt;/p&gt;
&lt;p&gt;Background: I am trying to convert V2.3 libs to V3 using scripts, and after running ```&lt;/p&gt;
&lt;p&gt;proj = projects.convert(oldlib, newlib, "{941937BF-9A12-4174-814E-63D1523C94CC}")&lt;/p&gt;
&lt;p&gt;``` I need to create Library Manager and add necessary libraries.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Frank&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>