<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to get visu clients information</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/</id><updated>2022-06-29T20:04:31.341000Z</updated><subtitle>Recent posts to get visu clients information</subtitle><entry><title>get visu clients information</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/?limit=50#692b" rel="alternate"/><published>2022-06-29T20:04:31.341000Z</published><updated>2022-06-29T20:04:31.341000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.com374f0804852b1b0c9202282c810f21dd2e292525</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;There is still one thing I don't understand, however.  If I use the responsive design, with a Client Manager Listener implementing VisuElems.IClientManagerListener3, why does the GlobalClientID variable always return -1?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>get visu clients information</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/?limit=50#bc81" rel="alternate"/><published>2022-06-29T19:38:11.550000Z</published><updated>2022-06-29T19:38:11.550000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.com9e1c35c2bd6070462891644eab91c2ec32201a73</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;For anyone else trying to figure this out, here's what finally worked:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;VAR_INPUT&lt;/span&gt;
&lt;span class="err"&gt;    itfClient:          VU.IVisualizationClient;&lt;/span&gt;
&lt;span class="err"&gt;END_VAR&lt;/span&gt;
&lt;span class="err"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt;    pClientWrapper:     POINTER TO VU.FbClientWrapper;&lt;/span&gt;
&lt;span class="err"&gt;    pClientData:        POINTER TO VisuElems.VisuStructClientData;&lt;/span&gt;
&lt;span class="err"&gt;END_VAR&lt;/span&gt;
&lt;span class="err"&gt;__QUERYPOINTER(itfClient, pClientWrapper);&lt;/span&gt;
&lt;span class="c"&gt;pClientData:= pClientWrapper^.ClientDataPointer;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;then pClientData points to the correct place, for example pClientData^.rClientRect.ptBottomRight.iX&lt;/p&gt;
&lt;p&gt;This was all by trial and error, so I really don't know if this is the right way to do it.  I wish Codesys would create better documentation.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>get visu clients information</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/?limit=50#0ffe" rel="alternate"/><published>2022-06-29T19:22:41.691000Z</published><updated>2022-06-29T19:22:41.691000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.combd72b2408c9579230a71cf3e59d16fd70305ec71</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The part I really don't understand is this:&lt;/p&gt;
&lt;p&gt;If I set a breakpoint in the HandleClient method of the VU.IVisualizationClientIteration interface, I get the attached screenshot, which seems to show that pClient is part of itfClient (VU.IVisualizationClient).  &lt;/p&gt;
&lt;p&gt;However, I can't access that pClient data in the program.  I tried to use QUERYPOINTER(itfClient, pClientData), but it returns an invalid pointer&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>get visu clients information</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/e7325692d5/?limit=50#e4ab" rel="alternate"/><published>2022-06-28T17:05:42.405000Z</published><updated>2022-06-28T17:05:42.405000Z</updated><author><name>tvm</name><uri>https://forge.codesys.com/u/tvm/</uri></author><id>https://forge.codesys.comad5b76c58cc6d89df7a242a70c1dc05253c7efb5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm trying to get the size of each visualization client and store it in an array.  There appears to be two approaches to getting information from the visu clients:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the Visu Utils client iteration.  Something like this thread:  &lt;a href="https://forge-codesys-com.translate.goog/forge/talk/Deutsch/thread/f14041c158/?xtrsl=auto&amp;amp;xtrtl=en&amp;amp;xtrhl=en-US&amp;amp;xtrpto=wapp#8477" rel="nofollow"&gt;https://forge-codesys-com.translate.goog/forge/talk/Deutsch/thread/f14041c158/?xtrsl=auto&amp;amp;xtrtl=en&amp;amp;xtrhl=en-US&amp;amp;xtrpto=wapp#8477&lt;/a&gt;&lt;br/&gt;
The problem, this works with an interface itfClinet of type VU.IVisualizationClient.  This interface appears to include the information I need.  When I go online and set a breakpoint, I can see variables like this, for example:  &lt;/li&gt;
&lt;/ol&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;itfClient._pClient^.rClientRect.pTopLeft.iX&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;However, I can't access this variable in my code.  I'm not exactly sure why not.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I could use something like the example here:  &lt;a href="https://forge.codesys.com/prj/codesys-example/responsive-desi/home/Home/."&gt;https://forge.codesys.com/prj/codesys-example/responsive-desi/home/Home/.&lt;/a&gt;  This will give me the client size variables I want, for example: &lt;/li&gt;
&lt;/ol&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;pClientData^.rClientRect.ptTopLeft&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;However&lt;br/&gt;
pClientData^.GlobalData.GlobalClientID always returns -1.&lt;/p&gt;
&lt;p&gt;I think I would prefer to use the responsive design method.  But is it possible to get the current client ID in the ClientSizeChanged method of a function block that implements VisuElems.IClientManagerListener3?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>