<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CloseTargetVisu</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/eefbfcdc88/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Visualization/thread/eefbfcdc88/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Visualization/thread/eefbfcdc88/</id><updated>2026-03-11T18:48:43.419000Z</updated><subtitle>Recent posts to CloseTargetVisu</subtitle><entry><title>CloseTargetVisu</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/eefbfcdc88/?limit=25#07ea" rel="alternate"/><published>2026-03-11T18:48:43.419000Z</published><updated>2026-03-11T18:48:43.419000Z</updated><author><name>mascara</name><uri>https://forge.codesys.com/u/mascara/</uri></author><id>https://forge.codesys.com95f7e8b1332342ec632ac0bc76a679f5722701d8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, it worked perfectly.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CloseTargetVisu</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/eefbfcdc88/?limit=25#84ee" rel="alternate"/><published>2026-03-11T13:39:04.672000Z</published><updated>2026-03-11T13:39:04.672000Z</updated><author><name>yannickasselin</name><uri>https://forge.codesys.com/u/yannickasselin/</uri></author><id>https://forge.codesys.comce82555e1fb1cb4f75f522608b6af88897f4b5a7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;To shutdown the TargetVisu:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add the VisuElemBase library to your project then call VisuElemBase.Visu_PRG.RemoveAllTargetVisuClients();&lt;/p&gt;
&lt;p&gt;Exemple:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;PROGRAM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PLC_PRG&lt;/span&gt;
&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;xShutdownTargetVisu&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&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;span class="nt"&gt;----------------------------------&lt;/span&gt;
&lt;span class="nt"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;xShutdownTargetVisu&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;THEN&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;xShutdownTargetVisu&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="nt"&gt;FALSE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;VisuElemBase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Visu_PRG&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;RemoveAllTargetVisuClients&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="nt"&gt;END_IF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I tried calling RemoveAllTargetVisuClients() directly from a button mouse click event but it makes the Visu crash. So better using the code above and just set xShutdownTargetVisu to TRUE from the button. Works fine for me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To start the TargetVisu:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From a cmd prompt. This will start the TargetVisu&lt;br/&gt;
C:\Program Files\CODESYS\CODESYS Control RTE3&amp;gt;VisualClientController.exe --application=Application --flags=1&lt;/p&gt;
&lt;p&gt;You can then place a .bat file on the desktop and put this inside:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;CD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:\Program Files\CODESYS\CODESYS Control RTE3"&lt;/span&gt;
&lt;span class="nv"&gt;VisualClientController&lt;/span&gt;.&lt;span class="nv"&gt;exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;application&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;Application&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;flags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Double clicking the .bat file will start the TargetVisu.&lt;/p&gt;
&lt;p&gt;You may need to replace the Application name by your own application name.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Good to know:&lt;/strong&gt;&lt;br/&gt;
In the cmd above, if you replace --flags=1 by --flags=2, it will shutdown the TargetVisu.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CloseTargetVisu</title><link href="https://forge.codesys.com/forge/talk/Visualization/thread/eefbfcdc88/?limit=25#9c3c" rel="alternate"/><published>2026-03-11T00:40:14.732000Z</published><updated>2026-03-11T00:40:14.732000Z</updated><author><name>mascara</name><uri>https://forge.codesys.com/u/mascara/</uri></author><id>https://forge.codesys.come97193f4a5414d15c7608322481201da0389ca23</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I need to add a button to the Visualization to close it. And create a shortcut on the Windows desktop to reopen the Visualization.&lt;/p&gt;
&lt;p&gt;This is necessary to configure, for example, a local IP address.&lt;/p&gt;
&lt;p&gt;Is this possible?&lt;br/&gt;
What command closes the Visualization?&lt;br/&gt;
Which program opens Visualization?&lt;/p&gt;
&lt;p&gt;System: Win10&lt;br/&gt;
Codesys: Control RTE V3 x64&lt;br/&gt;
Program: Codesys V3.5 SP20&lt;br/&gt;
Using only a touchscreen monitor, without keyboard and mouse.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>