<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Arrays of elements?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1f8a8de02/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1f8a8de02/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/b1f8a8de02/</id><updated>2020-02-27T17:56:35.227000Z</updated><subtitle>Recent posts to Arrays of elements?</subtitle><entry><title>Arrays of elements?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1f8a8de02/?limit=25#6856" rel="alternate"/><published>2020-02-27T17:56:35.227000Z</published><updated>2020-02-27T17:56:35.227000Z</updated><author><name>Comingback4u</name><uri>https://forge.codesys.com/u/comingback4u/</uri></author><id>https://forge.codesys.com6b4a709cda5b20e9f55f7237ce6a029a19086058</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You can do this using a polyline element in your visualization. Under the "Dynamic Points" properties of the element you specify a pointer to the points array. The structure of the points is VisuElems.VisuStructPoint. Some of your code would look like:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VAR&lt;/span&gt;
    &lt;span class="nv"&gt;aGraphPoints&lt;/span&gt;        :    &lt;span class="nv"&gt;ARRAY&lt;/span&gt;[&lt;span class="mi"&gt;0&lt;/span&gt;..&lt;span class="mi"&gt;99&lt;/span&gt;] &lt;span class="nv"&gt;OF&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuStructPoint&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;iCount&lt;/span&gt;      :    &lt;span class="nv"&gt;INT&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_VAR&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="nv"&gt;iCount&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;TO&lt;/span&gt; &lt;span class="mi"&gt;99&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt;
    &lt;span class="nv"&gt;aGraphPoints&lt;/span&gt;[&lt;span class="nv"&gt;iCount&lt;/span&gt;].&lt;span class="nv"&gt;iX&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;SOMEVALUE_X&lt;/span&gt;[&lt;span class="nv"&gt;iCount&lt;/span&gt;]&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;aGraphPoints&lt;/span&gt;[&lt;span class="nv"&gt;iCount&lt;/span&gt;].&lt;span class="nv"&gt;iY&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;SOMEVALUE_Y&lt;/span&gt;[&lt;span class="nv"&gt;iCount&lt;/span&gt;]&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_FOR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Arrays of elements?</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/b1f8a8de02/?limit=25#cdbf" rel="alternate"/><published>2020-02-27T17:56:34.169000Z</published><updated>2020-02-27T17:56:34.169000Z</updated><author><name>jjansen</name><uri>https://forge.codesys.com/u/jjansen/</uri></author><id>https://forge.codesys.com389f12d8091a6b6dd35cd07337be3a8fb6b9569d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm working on a project where I need to dynamically position lines on the screen.  I have structures for what these lines represent, and they are in an array.  Is there a way to create an array of lines so I can loop through and do something like:&lt;/p&gt;
&lt;p&gt;FOR i := 0 TO 10 DO&lt;br/&gt;
.....line&lt;span&gt;[i]&lt;/span&gt;.Position.Points&lt;span&gt;[0]&lt;/span&gt;.X := bin&lt;span&gt;[0]&lt;/span&gt;.left;&lt;br/&gt;
.....line&lt;span&gt;[i]&lt;/span&gt;.Position.Points&lt;span&gt;[1]&lt;/span&gt;.X := bin&lt;span&gt;[0]&lt;/span&gt;.right;&lt;br/&gt;
END_FOR&lt;/p&gt;
&lt;p&gt;How and where would I declare such an array?  Is there a structure somewhere that represents the positional data of the line?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Joe&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>