<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/</id><updated>2021-04-25T18:20:03.642000Z</updated><subtitle>Recent posts to Using VisuUserManagement Functions within a Program</subtitle><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#4833" rel="alternate"/><published>2021-04-25T18:20:03.642000Z</published><updated>2021-04-25T18:20:03.642000Z</updated><author><name>barton</name><uri>https://forge.codesys.com/u/barton/</uri></author><id>https://forge.codesys.come284403aaf2ae93fa50fc2f94aed70a08c6a0520</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a href="https://forge.codesys.com/prj/codesys-example/global-client-m/home/Home/"&gt;https://forge.codesys.com/prj/codesys-example/global-client-m/home/Home/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#930a/6ce8/03fa" rel="alternate"/><published>2021-04-22T14:36:30.546000Z</published><updated>2021-04-22T14:36:30.546000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.comc45e3f881a7ae318c5d315d8f94290da30fb2dce</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hey &lt;a class="user-mention" href="/u/kebek007/"&gt;@kebek007&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;so you are using a visualization(drop down list) and a fb is containing all the logic. This is in a lib.&lt;/p&gt;
&lt;p&gt;I would assume that you then reference this visualization with a frame.&lt;br/&gt;
Depending on your configuration, a specific element? would then react on a click and would try to open the login dialog.&lt;/p&gt;
&lt;p&gt;Then you could e.g. add an invisible input to your visualization and react to the click, if the configuration matches.&lt;/p&gt;
&lt;p&gt;If that is not an option and you call a function in the "Execute ST Code" action, just add an additional argument "pClientData" of type POINTER TO VisuElems.VisuStructClientData;&lt;/p&gt;
&lt;p&gt;If I am totally off, please attach a project archive.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#930a/6ce8" rel="alternate"/><published>2021-04-22T07:01:16.930000Z</published><updated>2021-04-22T07:01:16.930000Z</updated><author><name>kebek007</name><uri>https://forge.codesys.com/u/kebek007/</uri></author><id>https://forge.codesys.comb60c0e4ed61c6f8eafd52f3d616e246a53ae9583</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello @m.prestel,&lt;/p&gt;
&lt;p&gt;Why would I use this you ask?&lt;/p&gt;
&lt;p&gt;Well we have for example a drop down list that is custom (not the one from codesys) within a library that we also had for our use. &lt;/p&gt;
&lt;p&gt;This drop down list has been created to be very basic in use and has only the basic functionalities. Now if we want more functionalities we would extend the function block and handle click events through its method which we created.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Why is the input action not good enough:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is why we can not use the input action, otherwise we would copy the dropdownlist in our application and lose the sense of the library in the first place. Which for this case to call the login function would be the solution because I have wasted enough time on it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What trigger are trying to use then ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;According to which selected drop down list item then the login dialog will open only for the client that requested it. The other clients won't have another login dialog to see.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Why do you have to iterate over all the clients ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I actually don't want to. I just want to know how can I find out where did the request come from? If I use the input action within the properties of the visu element I would get that what I want to do. now why can't it work within iec code.&lt;/p&gt;
&lt;p&gt;This would have been avoided if everything is well documented. I am not convinced that I am the first person who wants to do something like this&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#930a" rel="alternate"/><published>2021-04-22T06:02:08.085000Z</published><updated>2021-04-22T06:02:08.085000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com193058199522cd8832dedddcf2487e28fb891386</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am sorry but I dont really get what you are trying to do? Why is the input action not good enough? What trigger are you trying to use then? Why do you have to iterate over all clients?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#1168/603f" rel="alternate"/><published>2021-04-22T05:59:48.104000Z</published><updated>2021-04-22T05:59:48.104000Z</updated><author><name>m.prestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.comf1d310e4f84f5c6937408aa19930dfdde3a3aca5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Could you maybe explain why you dont want to use the input actions?&lt;/p&gt;
&lt;p&gt;Could you please describe what you are trying to do?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#7daf" rel="alternate"/><published>2021-04-21T23:00:34.193000Z</published><updated>2021-04-21T23:00:34.193000Z</updated><author><name>barton</name><uri>https://forge.codesys.com/u/barton/</uri></author><id>https://forge.codesys.com1fceff902bf9940e7e30a6474be2316af5167a88</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm going to use this to determine if a particular client is currently displaying the visualization that I'm interested in. You could use this if the the event that you are seeking takes place only on a certain visualization. Inside the loop previously posted, find the name of the current visualization:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="nt"&gt;currentVisu&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VisuElemBase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IVisualisation&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;currentVisuName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;fullNameFlag&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="nt"&gt;currentVisu&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;clientDataPtr&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GlobalData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;LastVisu&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;currentVisuName&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;currentVisu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GetName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;fullNameFlag&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#b99b" rel="alternate"/><published>2021-04-21T17:29:08.169000Z</published><updated>2021-04-21T17:29:08.169000Z</updated><author><name>barton</name><uri>https://forge.codesys.com/u/barton/</uri></author><id>https://forge.codesys.com36e85e8827e7712d00e4de031daf5d4ef0d50cb2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Have you seen this example?&lt;br/&gt;
&lt;a href="https://forge.codesys.com/prj/codesys-example/visu-event-hand/home/Home/"&gt;https://forge.codesys.com/prj/codesys-example/visu-event-hand/home/Home/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#95b3" rel="alternate"/><published>2021-04-21T16:55:39.938000Z</published><updated>2021-04-21T16:55:39.938000Z</updated><author><name>kebek007</name><uri>https://forge.codesys.com/u/kebek007/</uri></author><id>https://forge.codesys.com63e6075498c2563fe608d558000a323f4718569b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="user-mention" href="/u/barton/"&gt;@barton&lt;/a&gt; Thanks a lot for your answer. I'm afraid that is a nightmare. There is no way of identifying where the click came from ? either some kind of function which returns the ID ? do you know where the USERCLIENTID comes from and if it is somehow during initialization set? Or is it provided by the OEM ? &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#7df4" rel="alternate"/><published>2021-04-21T16:15:02.641000Z</published><updated>2021-04-21T16:15:02.641000Z</updated><author><name>barton</name><uri>https://forge.codesys.com/u/barton/</uri></author><id>https://forge.codesys.com95d5e3be892c90c02dc8bdb11d82f9b81a9d9995</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have struggled with this myself. My solution is to broadcast the dialog to all clients then, upon receiving confirmation from the active client, close the dialog on the remaining clients.&lt;/p&gt;
&lt;p&gt;Open the dialog on all clients:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;METHOD&lt;/span&gt; &lt;span class="nt"&gt;OpenWarningDialog&lt;/span&gt;
&lt;span class="nt"&gt;VAR_INPUT&lt;/span&gt;
    &lt;span class="nt"&gt;DialogName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;128&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;

&lt;span class="nt"&gt;VAR&lt;/span&gt;
    &lt;span class="nt"&gt;isDialogOpen&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nt"&gt;visuMgr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VU&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IVisualizationClientIteration&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;dlogMgr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IDialogManager&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;clientDataPtr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;POINTER&lt;/span&gt; &lt;span class="nt"&gt;TO&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VisuStructClientData&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;warningDlog&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IVisualisationDialog&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;clientPtr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VisuStructClientData&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nt"&gt;result&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;POINTER&lt;/span&gt; &lt;span class="nt"&gt;TO&lt;/span&gt; &lt;span class="nt"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nt"&gt;dummy&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;dlogMgr&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_VisuManager&lt;/span&gt;.&lt;span class="nv"&gt;GetDialogManager&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;warningDlog&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;dlogMgr&lt;/span&gt;.&lt;span class="nv"&gt;GetDialog&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;DialogName&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;BeginIteration&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;clientDataPtr&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;WHILE&lt;/span&gt; &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt;
    &lt;span class="nv"&gt;isDialogOpen&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuDialogs&lt;/span&gt;.&lt;span class="nv"&gt;VisuDlgUtil_IsDialogOpen&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;warningDlog&lt;/span&gt;, &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt;, &lt;span class="nv"&gt;dlogMgr&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;NOT&lt;/span&gt; &lt;span class="nv"&gt;isDialogOpen&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
        &lt;span class="nv"&gt;dlogMgr&lt;/span&gt;.&lt;span class="nv"&gt;OpenDialog&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;dialog&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;warningDlog&lt;/span&gt;, &lt;span class="nv"&gt;pClient&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt;, &lt;span class="nv"&gt;bModal&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;TRUE&lt;/span&gt;, &lt;span class="nv"&gt;pRect&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;END_IF&lt;/span&gt;
    &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_WHILE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Close the dialog on all remaining clients.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;METHOD&lt;/span&gt; &lt;span class="nt"&gt;CloseWarningDialog&lt;/span&gt;
&lt;span class="nt"&gt;VAR_INPUT&lt;/span&gt;
    &lt;span class="nt"&gt;DialogName&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;128&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;

&lt;span class="nt"&gt;VAR&lt;/span&gt;
    &lt;span class="nt"&gt;isDialogOpen&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;BOOL&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 
    &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="nt"&gt;visuMgr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VU&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IVisualizationClientIteration&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;dlogMgr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IDialogManager&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;clientDataPtr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;POINTER&lt;/span&gt; &lt;span class="nt"&gt;TO&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;VisuStructClientData&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="nt"&gt;warningDlog&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;VisuElems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;IVisualisationDialog&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;dlogMgr&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_VisuManager&lt;/span&gt;.&lt;span class="nv"&gt;GetDialogManager&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;warningDlog&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;dlogMgr&lt;/span&gt;.&lt;span class="nv"&gt;GetDialog&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;DialogName&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;BeginIteration&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;clientDataPtr&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;WHILE&lt;/span&gt; &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt;
    &lt;span class="nv"&gt;isDialogOpen&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuDialogs&lt;/span&gt;.&lt;span class="nv"&gt;VisuDlgUtil_IsDialogOpen&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;warningDlog&lt;/span&gt;, &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt;, &lt;span class="nv"&gt;dlogMgr&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;isDialogOpen&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
        &lt;span class="nv"&gt;dlogMgr&lt;/span&gt;.&lt;span class="nv"&gt;CloseDialog&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;dialog&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;warningDlog&lt;/span&gt;, &lt;span class="nv"&gt;pClient&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;END_IF&lt;/span&gt;
    &lt;span class="nv"&gt;clientDataPtr&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_WHILE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Using VisuUserManagement Functions within a Program</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/669973998c/?limit=25#f577" rel="alternate"/><published>2021-04-21T15:53:54.599000Z</published><updated>2021-04-21T15:53:54.599000Z</updated><author><name>kebek007</name><uri>https://forge.codesys.com/u/kebek007/</uri></author><id>https://forge.codesys.com27d02ea63e6f85aa8168438e106e8db97f79d5b2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ok after tinkering a little bit and I understood how this works. This opened other questions.&lt;/p&gt;
&lt;p&gt;so basically one has to get all connected clients by doing the following - This was taken from VisuClientIPAdresse_v1.1 Project so I do not take credit for that (but I will comment it):&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;BeginIteration&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nv"&gt;get&lt;/span&gt; &lt;span class="k"&gt;next&lt;/span&gt; &lt;span class="nv"&gt;client&lt;/span&gt; 
&lt;span class="nv"&gt;pClient&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;WHILE&lt;/span&gt; &lt;span class="nv"&gt;pClientData&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;DO&lt;/span&gt;
    &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nv"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;long&lt;/span&gt; &lt;span class="nv"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;a&lt;/span&gt; &lt;span class="nv"&gt;client&lt;/span&gt; &lt;span class="nv"&gt;is&lt;/span&gt; &lt;span class="nv"&gt;available&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="k"&gt;IF&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;pClientData&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;.&lt;span class="nv"&gt;GlobalData&lt;/span&gt;.&lt;span class="nv"&gt;ClientType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;Visu_ClientType&lt;/span&gt;.&lt;span class="nv"&gt;Targetvisualization&lt;/span&gt; &lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="k"&gt;THEN&lt;/span&gt;
        &lt;span class="nv"&gt;pClientDatatTargetVisu&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;pClientData&lt;/span&gt;&lt;span class="c1"&gt;;  // assign it to a Global variable if its target visu&lt;/span&gt;
    &lt;span class="nv"&gt;ELSIF&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt; &lt;span class="nv"&gt;pClientData&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;.&lt;span class="nv"&gt;GlobalData&lt;/span&gt;.&lt;span class="nv"&gt;ClientType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;Visu_ClientType&lt;/span&gt;.&lt;span class="nv"&gt;Webvisualization&lt;/span&gt; &lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="k"&gt;THEN&lt;/span&gt;
            &lt;span class="nv"&gt;pClientDatatWebVisu&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;pClientData&lt;/span&gt;&lt;span class="c1"&gt;; // assign it to a Global variable if its web visu&lt;/span&gt;
    &lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nv"&gt;get&lt;/span&gt; &lt;span class="k"&gt;next&lt;/span&gt; &lt;span class="nv"&gt;client&lt;/span&gt;
    &lt;span class="nv"&gt;pClientData&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;VisuElems&lt;/span&gt;.&lt;span class="nv"&gt;VisuElemBase&lt;/span&gt;.&lt;span class="nv"&gt;g_ClientManager&lt;/span&gt;.&lt;span class="nv"&gt;GetNextClient&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;END_WHILE&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;What I am trying to do is the following:&lt;/p&gt;
&lt;p&gt;1 - I have created a library with a drop down list (which is conform to our own Style)&lt;/p&gt;
&lt;p&gt;2 - I use an FB within the library that manages the click events&lt;/p&gt;
&lt;p&gt;-&amp;gt; I extend the click event function within my project in order to call the Login Dialog from the UserManagement library. Now here is the tricky part. Usually our display is given out to all the clients. We have a total of 1 Target Visualization and up to 2 Web Visualizations (we limited it for performance reasons).&lt;/p&gt;
&lt;p&gt;For the login event we would like however to differentiate between which request came from where. So if someone is on the target visu entering the credentials , the login dialogue doesn't pop up on our web visualization and vice versa. &lt;/p&gt;
&lt;p&gt;I added the Library VisuGlobalClientManager in order to use CURRENTCLIENTID. However I checked all the information and all Clients have the Currentclientid = -1. &lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/g_pClientTargetVisu.png" width="50%"/&gt;&lt;br/&gt;
&lt;img src="./attachment/g_pClientWebVisu.png" width="50%"/&gt;&lt;/p&gt;
&lt;p&gt;Am I missing anything ? why are all the currentclientid = -1 ? How can I get some kind of unique Identification based on a click event to know where the click came from, from Target Visu ? or WebVisu ?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>