<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/</id><updated>2025-03-27T22:45:08.032000Z</updated><subtitle>Recent posts to C0357: "GetNextClient" is obsolete, use VisuUtils instead</subtitle><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#3751" rel="alternate"/><published>2025-03-27T22:45:08.032000Z</published><updated>2025-03-27T22:45:08.032000Z</updated><author><name>pistola</name><uri>https://forge.codesys.com/u/pistola/</uri></author><id>https://forge.codesys.com2f1ee3aabcd4a15b687d7f9712529ae4cf60466f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm having some troubles with this same issue and I'm wondering if someone can help me out. &lt;/p&gt;
&lt;p&gt;On a settings visual I allow the operator to enter some values however if they activate the page change button it will change the change with the Numpad dialog open. Since I'm using Visuelems.CURRENTVISU to change the pages I came across this code noted below for determining if the Numpad dialog was active.&lt;/p&gt;
&lt;p&gt;This code worked great however now in 3.5.19 it's not obsolete. I've tried following the directions in the attached program above however I can't see to get it to work in my program. &lt;/p&gt;
&lt;p&gt;Can anyone provide some help to determine if a dialog is open? &lt;/p&gt;
&lt;p&gt;FUNCTION Check_Dialog_Open : Bool&lt;br/&gt;
VAR_INPUT&lt;br/&gt;
    sDialogName : STRING; // Input variable for the name of the dialog&lt;br/&gt;
END_VAR&lt;br/&gt;
VAR&lt;br/&gt;
    pstClientData : POINTER TO VisuElems.VisuStructClientData;  // Pointer to the client data structure&lt;br/&gt;
    itfDialogManager : VisuElems.IDialogManager;  // Interface for the dialog manager&lt;br/&gt;
    itfMyDialog : VisuElems.IVisualisationDialog; // Interface for the specific visualisation dialog&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;// Begin the iteration over the client manager&lt;br/&gt;
VisuElems.g_ClientManager.BeginIteration();&lt;/p&gt;
&lt;p&gt;// Loop through each client until no more clients are found&lt;br/&gt;
WHILE (pstClientData := VisuElems.VisuElemBase.g_ClientManager.GetNextClient()) &amp;lt;&amp;gt; 0 DO&lt;br/&gt;
    // Get the dialog manager interface&lt;br/&gt;
    itfDialogManager := VisuElems.g_VisuManager.GetDialogManager();&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// Get the specific dialog interface using the dialog name&lt;/span&gt;
&lt;span class="n"&gt;itfMyDialog&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;itfDialogManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetDialog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sDialogName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Check if the dialog is open for the current client&lt;/span&gt;
&lt;span class="n"&gt;Check_Dialog_Open&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;VisuDialogs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;VisuDlgUtil_IsDialogOpen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;itfMyDialog&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pstClientData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;itfDialogManager&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// If the dialog is open, exit the loop&lt;/span&gt;
&lt;span class="n"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Check_Dialog_Open&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;THEN&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;EXIT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_IF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;END_WHILE&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#d0a7" rel="alternate"/><published>2021-05-04T08:36:43.941000Z</published><updated>2021-05-04T08:36:43.941000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com017e152e85da6aeecba28b567b781f9e9b46a588</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/sedoerr/"&gt;@sedoerr&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the example, the custom filter "ClientFilter" is used as itfClientFilter.&lt;br/&gt;
The "ClientFilter" accepts currently all clients, since "IsAccepted" always returns true&lt;/p&gt;
&lt;p&gt;You can use the "ClientFilter" from the example, but VisuUtils also provides some predefined filters, see "Globals" inside VisuUtils.&lt;/p&gt;
&lt;p&gt;Once you defined your filter, check out "VisuClientIteration".&lt;br/&gt;
In your case I would reset your counter inside "StartIteration" and increase it in HandleClient.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#2bf0" rel="alternate"/><published>2021-05-04T08:26:58.123000Z</published><updated>2021-05-04T08:26:58.123000Z</updated><author><name>sedoerr</name><uri>https://forge.codesys.com/u/sedoerr/</uri></author><id>https://forge.codesys.com153b95bff5e0953d4f3810ea0243e9915c2fa56f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;@m.prestel&lt;br/&gt;
yes, i checked the example, but at the moment, i don't understand how to replace "GetNextClient" with this what @Thomas has done in his example.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#7aee/a5e0" rel="alternate"/><published>2021-05-04T07:15:34.554000Z</published><updated>2021-05-04T07:15:34.554000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.come2896fd3f1930b4879c66c6589898c79cef13c10</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hey &lt;a class="user-mention" href="/u/sedoerr/"&gt;@sedoerr&lt;/a&gt;,&lt;br/&gt;
have you checked out the example by Thomas?&lt;/p&gt;
&lt;p&gt;You can adjust the ClientFilter or use a predefined one from the VisuUtils.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#7aee" rel="alternate"/><published>2021-05-03T10:39:51.058000Z</published><updated>2021-05-03T10:39:51.058000Z</updated><author><name>sedoerr</name><uri>https://forge.codesys.com/u/sedoerr/</uri></author><id>https://forge.codesys.com83e2ad024d7793cb1cf9555594dad6f7103be035</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;THX for this. I will check this if i have time.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#389e" rel="alternate"/><published>2021-05-03T09:30:40.932000Z</published><updated>2021-05-03T09:30:40.932000Z</updated><author><name>Thomas</name><uri>https://forge.codesys.com/u/thk/</uri></author><id>https://forge.codesys.com2f205316337f48a86e762e074b58c548442c27be</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey,&lt;br/&gt;
hope the example of "VU.IVisualizationClientIteration" will help.&lt;/p&gt;
&lt;p&gt;Regards &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>C0357: "GetNextClient" is obsolete, use VisuUtils instead</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1a979957d8/?limit=25#3711" rel="alternate"/><published>2021-05-03T08:16:57.534000Z</published><updated>2021-05-03T08:16:57.534000Z</updated><author><name>sedoerr</name><uri>https://forge.codesys.com/u/sedoerr/</uri></author><id>https://forge.codesys.com9bfa16f08525dc7edcd41c842c6d3da68ebef382</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey there,&lt;/p&gt;
&lt;p&gt;since i changed to SP17, to get this new warning about POU "GetNextClient". I really use this often in my project. &lt;br/&gt;
Does anyone know how to use VisuUtils instead?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>