<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Scripting Symbol Configuration</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/</id><updated>2023-08-02T12:35:54.488000Z</updated><subtitle>Recent posts to Scripting Symbol Configuration</subtitle><entry><title>Scripting Symbol Configuration</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/?limit=25#3f47/8a9f/1f2c/7ca5/ece0" rel="alternate"/><published>2023-08-02T12:35:54.488000Z</published><updated>2023-08-02T12:35:54.488000Z</updated><author><name>kida</name><uri>https://forge.codesys.com/u/kida/</uri></author><id>https://forge.codesys.com45c5e320e0cf101a4a22bac0bacbb4f0b474f372</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Martin,&lt;/p&gt;
&lt;p&gt;Thanks for the valuable solution but how is it possible that I don't find the create_symbol_config method in the online help? &lt;br/&gt;
This is not the first time when a posted solution on this forum uses undocumented methods. Am I searching at the wrong place or is there a trick? (It is quite hard to develop applications like this:) )&lt;br/&gt;
Thanks for the answer!&lt;br/&gt;
BR&lt;br/&gt;
David&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Scripting Symbol Configuration</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/?limit=25#3f47/8a9f/1f2c/7ca5" rel="alternate"/><published>2020-03-10T14:05:06.477000Z</published><updated>2020-03-10T14:05:06.477000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.com047278eb521c0453924f149e7d264b213ffce9a3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I tested it with CODESYS 64 V3.5 SP15 Patch 3 with a newly created standard project and the following python script:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Guid&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;projects&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;primary&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;active_application&lt;/span&gt;

&lt;span class="n"&gt;optimizedCalculator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Guid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'{0141eb75-141b-4ea1-9a8c-75f952b22a6c}'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;symbol&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create_symbol_config&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;optimizedCalculator&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Symbol config created'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;InvalidOperationException&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'SymbolConfigObject could not be created: '&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Scripting Symbol Configuration</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/?limit=25#3f47/8a9f/1f2c" rel="alternate"/><published>2020-03-09T18:44:05.193000Z</published><updated>2020-03-09T18:44:05.193000Z</updated><author><name>nico-cph</name><uri>https://forge.codesys.com/u/nico-cph/</uri></author><id>https://forge.codesys.comc9939349c528e788b2e359c5e4209061e8529d46</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Martin&lt;/p&gt;
&lt;p&gt;Thanks for your switch reply.&lt;/p&gt;
&lt;p&gt;Just checked - I am using V3.5 SP15. So i reckon it should work right?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Scripting Symbol Configuration</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/?limit=25#3f47/8a9f" rel="alternate"/><published>2020-03-09T15:52:49.066000Z</published><updated>2020-03-09T15:52:49.066000Z</updated><author><name>mkeller</name><uri>https://forge.codesys.com/u/mkeller/</uri></author><id>https://forge.codesys.come8628aa179552658358bc8460227fb7ef86b5794</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Which version of CODESYS do you use?&lt;/p&gt;
&lt;p&gt;The creation of symbol config object via Scripting was added with CODESYS V3.5 SP10. If you use an older version of CODESYS it will not work.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Martin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Scripting Symbol Configuration</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/665ecde028/?limit=25#3f47" rel="alternate"/><published>2020-03-09T08:48:06.552000Z</published><updated>2020-03-09T08:48:06.552000Z</updated><author><name>nico-cph</name><uri>https://forge.codesys.com/u/nico-cph/</uri></author><id>https://forge.codesys.com5029c4ca1c3a96e17151674c028ab8bc349a603c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;Relatively new to scripting on Codesys and I am having some problems with the Symbol Configuration - hopefully someone has solved that.&lt;/p&gt;
&lt;p&gt;I have tried various suggestions from this forum, but without success. Example:&lt;/p&gt;
&lt;p&gt;from System import Guid&lt;br/&gt;
optimizedCalculator = Guid('{0141eb75-141b-4ea1-9a8c-75f952b22a6c}')&lt;br/&gt;
app = projects.primary.active_application&lt;br/&gt;
symbol = app.create_symbol_config(False, False, optimizedCalculator)&lt;br/&gt;
print('Symbol config created')&lt;/p&gt;
&lt;p&gt;Error in the above is AttributeError 'ScriptObject' has no attribute 'create_symbol_configuration', but I have been various errors - depending on the example I have tried out.&lt;/p&gt;
&lt;p&gt;Basically i'm trying to create/generate the Symbol Configuration via a script, but it does not really succeed.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>