<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Exporting library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/</id><updated>2020-02-27T15:03:55.206000Z</updated><subtitle>Recent posts to Exporting library</subtitle><entry><title>Exporting library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/?limit=25#3a12" rel="alternate"/><published>2020-02-27T15:03:55.206000Z</published><updated>2020-02-27T15:03:55.206000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comb9df465fb0a6ac7f419aa960e3d1aceab910e78d</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;blockquote&gt;
&lt;p&gt;&lt;strong&gt;etamgul hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Sorry. To clearify: I'd like to export a lirbary - opened as primary project - to PLCOpenXML format.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The "IEnumerable&amp;lt;iextendedobject&amp;lt;iscriptobject&amp;gt;&amp;gt;" should be taken as a hint that one should pass a sequence of script objects there.&amp;lt;/iextendedobject&amp;lt;iscriptobject&amp;gt;&lt;/p&gt;
&lt;p&gt;The easiest way should be to use proj.get_children(false) and set the "recursive" parameter of export_xml(...) to true.&lt;/p&gt;
&lt;p&gt;HTH,&lt;br/&gt;
Markus&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Exporting library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/?limit=25#5da7" rel="alternate"/><published>2020-02-27T15:03:53.510000Z</published><updated>2020-02-27T15:03:53.510000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.comef16263356fd46594092a9c63d9017c6988ee970</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Sorry. To clearify: I'd like to export a lirbary - opened as primary project - to PLCOpenXML format.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Exporting library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/?limit=25#f598" rel="alternate"/><published>2020-02-27T15:03:52.864000Z</published><updated>2020-02-27T15:03:52.864000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com2d9ef72d6b31e7a8a79ffb7ebf5b8e175f490c03</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, etamgul,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;etamgul hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I'm having trouble to export my library using the script, only found sample to Import an XML.&lt;br/&gt;
Can someone explain/give sample how could I use this interface?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;export_xml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IExtendedObject&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IScriptObject&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;bool&lt;/span&gt; &lt;span class="k"&gt;recursive&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;export_folder_structure&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;declarations_as_plaintext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;How can I gather an Enumerable of ExtendedObjects from a project that opened a library?&lt;/p&gt;
&lt;p&gt;Your question is not completely clear to me:&lt;/p&gt;
&lt;p&gt;Do you want to export objects from a library which is opened as primary project, or do you want to export an already installed library from the library repository which happens to be referenced from the currently open project?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Exporting library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/451902a011/?limit=25#21a9" rel="alternate"/><published>2020-02-27T15:03:52.240000Z</published><updated>2020-02-27T15:03:52.240000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.com62a044c6c9ce3e1bebe1e43a50b7845cce82bc66</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm having trouble to export my library using the script, only found sample to Import an XML.&lt;/p&gt;
&lt;p&gt;Can someone explain/give sample how could I use this interface?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;export_xml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IExtendedObject&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IScriptObject&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;bool&lt;/span&gt; &lt;span class="k"&gt;recursive&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;export_folder_structure&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;declarations_as_plaintext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;How can I gather an Enumerable of ExtendedObjects from a project that opened a library?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>