<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to How to read structure in CodeSys using pythong script?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f5612768b9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f5612768b9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/f5612768b9/</id><updated>2020-02-27T14:50:24.914000Z</updated><subtitle>Recent posts to How to read structure in CodeSys using pythong script?</subtitle><entry><title>How to read structure in CodeSys using pythong script?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f5612768b9/?limit=25#6831" rel="alternate"/><published>2020-02-27T14:50:24.914000Z</published><updated>2020-02-27T14:50:24.914000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com474b30f7367be56cfd4680a9db2bd7bf952e2870</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi SashaSasha.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;SashaSasha hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
1. How can I read all structure without knowledge of fields inside this structure using python?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What do you mean with "read all structure..."? Read the online value through Monitoring or finding and reading the DUT objects?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;SashaSasha hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
2. Does CodeSys has some alternatives for tkFileDialog library? How can I create some dialog boxes for opening/clothing files?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Look in the Scripting API documenation for the interface/class  which contains methods to open dialogs.&lt;/p&gt;
&lt;p&gt;Here some example code:```&lt;/p&gt;
&lt;p&gt;print("Now, the user can select files and directories")&lt;br/&gt;
res = system.ui.open_file_dialog("Choose multiple files:", filter="Text files (&lt;em&gt;.txt)|&lt;/em&gt;.txt|Image Files(&lt;em&gt;.BMP;&lt;/em&gt;.JPG;&lt;em&gt;.GIF)|&lt;/em&gt;.BMP;&lt;em&gt;.JPG;&lt;/em&gt;.GIF|All files (&lt;em&gt;.&lt;/em&gt;)|&lt;em&gt;.&lt;/em&gt;", filter_index = 0, multiselect=True)&lt;br/&gt;
print("The user did choose: '%s'" % str(res)) # res is a tuple as multiselect is true.&lt;/p&gt;
&lt;p&gt;```&lt;br/&gt;
BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to read structure in CodeSys using pythong script?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/f5612768b9/?limit=25#da5a" rel="alternate"/><published>2020-02-27T14:50:23.231000Z</published><updated>2020-02-27T14:50:23.231000Z</updated><author><name>SashaSasha</name><uri>https://forge.codesys.com/u/sashasasha/</uri></author><id>https://forge.codesys.com96a6e76db7e6bfaa1a3d37d6678c6ab6d6b3cf1e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I have some question about python for CodeSys:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;How can I read all structure without knowledge of fields inside this structure using python?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Does CodeSys has some alternatives for tkFileDialog library? How can I create some dialog boxes for opening/clothing files?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</summary></entry></feed>