<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Defining local variables that can be independent with several users.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/63ad977851/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/63ad977851/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/63ad977851/</id><updated>2023-10-21T08:39:57.112000Z</updated><subtitle>Recent posts to Defining local variables that can be independent with several users.</subtitle><entry><title>Defining local variables that can be independent with several users.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/63ad977851/?limit=25#e3f8" rel="alternate"/><published>2023-10-21T08:39:57.112000Z</published><updated>2023-10-21T08:39:57.112000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com749cdff9bdee4dc9768ebd4474f5ac947f43abfc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You need to create an array with one element for each possible user. I usually define these arrays in the root screen.  &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;FrameIndex&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Array&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="n"&gt;MaxUsers&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then use the global CurrentClientId (defined by one of the VISU libraries) to index the array element used to select  the frame.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;FrameIndex&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;CurrentClientId&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining local variables that can be independent with several users.</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/63ad977851/?limit=25#eecf" rel="alternate"/><published>2023-09-04T13:00:30.112000Z</published><updated>2023-09-04T13:00:30.112000Z</updated><author><name>Automa</name><uri>https://forge.codesys.com/u/automa/</uri></author><id>https://forge.codesys.com87e3cd053b637dae91b567cfab2af5c5da161946</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, I am looking for a way to define a local variable that will be multi user independent. This is so several user can connect at the same time select frames independent of each other.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>