<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Automation SDK - Reset pins on a function after inserting</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1290f3ae0a/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1290f3ae0a/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/1290f3ae0a/</id><updated>2020-02-27T13:54:12.661000Z</updated><subtitle>Recent posts to Automation SDK - Reset pins on a function after inserting</subtitle><entry><title>Automation SDK - Reset pins on a function after inserting</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1290f3ae0a/?limit=25#2dc6" rel="alternate"/><published>2020-02-27T13:54:12.661000Z</published><updated>2020-02-27T13:54:12.661000Z</updated><author><name>BobbieB</name><uri>https://forge.codesys.com/u/bobbieb/</uri></author><id>https://forge.codesys.comdb768ca79eedfafa5f55effcf37212a25f810db6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The library is already part of the project. I can add by hand in the editor. &lt;br/&gt;
Also, the box I insert, if I double click on it,it correctly shows me information about it being a Timer, so I know the compiler understands what the block is used for.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Automation SDK - Reset pins on a function after inserting</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1290f3ae0a/?limit=25#3a07" rel="alternate"/><published>2020-02-27T13:54:12.480000Z</published><updated>2020-02-27T13:54:12.480000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comf76b8462a5fc232e4ea09b343513755f8c2e0fbd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm just guessing, but maybe you haven't added the standard library to your project yet.&lt;br/&gt;
Then the compiler doesn't know about TON yet and doesn't know which inputs / outputs it has.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Automation SDK - Reset pins on a function after inserting</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1290f3ae0a/?limit=25#2020" rel="alternate"/><published>2020-02-27T13:54:12.279000Z</published><updated>2020-02-27T13:54:12.279000Z</updated><author><name>BobbieB</name><uri>https://forge.codesys.com/u/bobbieb/</uri></author><id>https://forge.codesys.comc4d1a5138081e349613f0ecaf982824f0c1e27e9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ive figured out how to insert a "box" on to a CFC type POU, but after setting it to lets say "TON" I was expecting to see the pins appear.&lt;br/&gt;
How do I reset teh box to show the pins? (I use the term reset, as its on the menu when I right click on the box).&lt;/p&gt;
&lt;p&gt;I am trying to write a component that allows logic to be written straight to a POU, and I have not foound any documentation on how to do this, so I am making random guesses at the moment.&lt;/p&gt;
&lt;p&gt;I am using the following to add the box on the CFC POU&lt;/p&gt;
&lt;p&gt;private _3S.CoDeSys.CFCObject.ICFCElement add_cfc_box(_3S.CoDeSys.CFCObject.ICFCImplementationObject2 impl, _3S.CoDeSys.CFCObject.KindOfCall type, string name, string instance, System.Drawing.Rectangle bound)&lt;br/&gt;
        {&lt;br/&gt;
            _3S.CoDeSys.CFCObject.ICFCItem4 item = ComponentManager.Singleton.CreateInstance(objects_ids.GUID_CFCBOXELEMENT) as _3S.CoDeSys.CFCObject.ICFCItem4;&lt;br/&gt;
            _3S.CoDeSys.CFCObject.ICFCElement2 elem = item as _3S.CoDeSys.CFCObject.ICFCElement2;&lt;br/&gt;
            elem.KindOfCall = type;&lt;br/&gt;
            // name&lt;br/&gt;
            _3S.CoDeSys.CFCObject.ICFCText Name = ComponentManager.Singleton.CreateInstance(objects_ids.GUID_CFCTEXT) as _3S.CoDeSys.CFCObject.ICFCText;&lt;br/&gt;
            Name.Text = name;&lt;br/&gt;
            elem.Texts.Add(Name);&lt;br/&gt;
            // instance          &lt;br/&gt;
            _3S.CoDeSys.CFCObject.ICFCText Instance = ComponentManager.Singleton.CreateInstance(objects_ids.GUID_CFCTEXT) as _3S.CoDeSys.CFCObject.ICFCText;&lt;br/&gt;
            Instance.Text = instance;&lt;br/&gt;
            elem.Texts.Add(Instance);&lt;br/&gt;
            // position&lt;br/&gt;
            item.Bounds = bound;&lt;br/&gt;
            impl.Items.Add(item);&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;elem&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;}&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>