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.
To start the TargetVisu:
From a cmd prompt. This will start the TargetVisu
C:\Program Files\CODESYS\CODESYS Control RTE3>VisualClientController.exe --application=Application --flags=1
You can then place a .bat file on the desktop and put this inside:
CD"C:\Program Files\CODESYS\CODESYS Control RTE3"VisualClientController.exe--application=Application--flags=1exit
Double clicking the .bat file will start the TargetVisu.
You may need to replace the Application name by your own application name.
Good to know:
In the cmd above, if you replace --flags=1 by --flags=2, it will shutdown the TargetVisu.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to add a button to the Visualization to close it. And create a shortcut on the Windows desktop to reopen the Visualization.
This is necessary to configure, for example, a local IP address.
Is this possible?
What command closes the Visualization?
Which program opens Visualization?
System: Win10
Codesys: Control RTE V3 x64
Program: Codesys V3.5 SP20
Using only a touchscreen monitor, without keyboard and mouse.
To shutdown the TargetVisu:
Add the VisuElemBase library to your project then call VisuElemBase.Visu_PRG.RemoveAllTargetVisuClients();
Exemple:
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.
To start the TargetVisu:
From a cmd prompt. This will start the TargetVisu
C:\Program Files\CODESYS\CODESYS Control RTE3>VisualClientController.exe --application=Application --flags=1
You can then place a .bat file on the desktop and put this inside:
Double clicking the .bat file will start the TargetVisu.
You may need to replace the Application name by your own application name.
Good to know:
In the cmd above, if you replace --flags=1 by --flags=2, it will shutdown the TargetVisu.
Thank you, it worked perfectly.