<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/</id><updated>2020-02-27T14:56:23.977000Z</updated><subtitle>Recent posts to Distinguish object types in project tree</subtitle><entry><title>Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/?limit=25#2088" rel="alternate"/><published>2020-02-27T14:56:23.977000Z</published><updated>2020-02-27T14:56:23.977000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.comf75bfa9bddaad0405324b2f3afbd88c5e4580821</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi qbarral.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;dbarral hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Is there a property than can be checked for Visualizations?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sorry, but no.&lt;/p&gt;
&lt;p&gt;We have Scripting API for Text List and Image Pool but not for the Visual objects.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/?limit=25#6240" rel="alternate"/><published>2020-02-27T14:56:22.278000Z</published><updated>2020-02-27T14:56:22.278000Z</updated><author><name>dbarral</name><uri>https://forge.codesys.com/u/dbarral/</uri></author><id>https://forge.codesys.comf7d46685dc08b02eebb290181fda0507b5d9db23</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;M.Keller hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
For POUs you could check the object for the property "has_textual_declaration" because all POU objects have an textual declaration.&lt;br/&gt;
BR&lt;br/&gt;
Martin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is there a property than can be checked for Visualizations?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Daniel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/?limit=25#dcc7" rel="alternate"/><published>2020-02-27T14:56:21.677000Z</published><updated>2020-02-27T14:56:21.677000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com31b85948c273beaa025c3a6e7e2b49456afcc0ec</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi FloWil.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;FloWil hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I basically need to have one POU/Visualisation in one exported file.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For POUs you could check the object for the property "has_textual_declaration" because all POU objects have an textual declaration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;FloWil hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Visualisations do not export to PLCOpenXML though at all as it seems?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think it is not part of the PLCopenXML specification.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/?limit=25#b9a4" rel="alternate"/><published>2020-02-27T14:56:19.859000Z</published><updated>2020-02-27T14:56:19.859000Z</updated><author><name>FloWil</name><uri>https://forge.codesys.com/u/flowil/</uri></author><id>https://forge.codesys.comee254ca776b028df81b7e9cd2edb8919215a5f85</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes so i saw the functions for testing for folder and devices. &lt;br/&gt;
The use case is exporting of the project, but on a per-file basis.&lt;br/&gt;
I basically need to have one POU/Visualisation in one exported file. &lt;/p&gt;
&lt;p&gt;This is also why i am not using the recursive export on the project, because it will stop exporting when encountering a subfolder of project. I have this working already for everything code related by using PLCOpenXML-files. &lt;br/&gt;
Visualisations do not export to PLCOpenXML though at all as it seems?&lt;br/&gt;
So the idea is to export them seperately in native format.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/?limit=25#9142" rel="alternate"/><published>2020-02-27T14:56:19.187000Z</published><updated>2020-02-27T14:56:19.187000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.come24a5a7ee567f06ec75c88ede1efaa5cdcc73488</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi FloWil.&lt;/p&gt;
&lt;p&gt;What's the use case behind your question?&lt;/p&gt;
&lt;p&gt;Some objects, which are supported by the ScriptEngine, have a special property. For example, the device object has the property "is_device".&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Distinguish object types in project tree</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/64e090e0db/?limit=25#2c38" rel="alternate"/><published>2020-02-27T14:56:18.535000Z</published><updated>2020-02-27T14:56:18.535000Z</updated><author><name>FloWil</name><uri>https://forge.codesys.com/u/flowil/</uri></author><id>https://forge.codesys.com72268e8b7ff7fff5663452966f0a70c83e154d60</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is it possible to determine the of objects in the project tree while iterating over them?&lt;br/&gt;
I need to distinguish between POUs and Visualization objects for example.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;child&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;folderobject&lt;/span&gt;.&lt;span class="nv"&gt;get_children&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;child&lt;/span&gt;.&lt;span class="nv"&gt;is_folder&lt;/span&gt;:
            &lt;span class="nv"&gt;print&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Found folder: {}&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;.&lt;span class="nv"&gt;format&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;child&lt;/span&gt;.&lt;span class="nv"&gt;get_name&lt;/span&gt;&lt;span class="ss"&gt;()))&lt;/span&gt;
            &lt;span class="nv"&gt;export_folder&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;child&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;else&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;child&lt;/span&gt;.&lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;child.type() will only return these guid, but from my current understanding i have no way tell what kind of object that is?&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;br/&gt;
Florian&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>