EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-26 09:13 AM . Last Modified: 2023-05-03 12:22 AM
>>Message imported from previous forum - Category:Scripts and Tips<<
User: hardin4019, originally posted: 2019-07-22 16:28:41 Id:476
I have working mimic layer with visibility buttons ( 1 for RTU Health, and 1 for Location info) that each toggle the visibility of their own layers. The annoying thing I am trying to work around, is that the layers are stacked, and if you turn on the top layer, you can't see the bottom layer without first turning back off the top layer. Is it possible to have both buttons not only turn on or off (iif Statement) their respective layer, but also turn off the visibility of the other layer with Registry expressions? Or are there better options for completing the task?
RTU Health button PickType 8, PickParam:
'ShowRTUHealth( ' + IIF( Registry('ShowRTUHealth', 1 ) = 0, '1', '0' ) + ' ) '
RTU Health Layer Visibility Expression:
Registry ('ShowRTUHealth', 0) = 1
Location Button PickType 9, PickParam:
'ShowLocation( ' + IIF( Registry('ShowLocation', 1 ) = 0, '1', '0' ) + ' ) '
Location Layer Visibility Expression:
Registry ('ShowLocation', 0) = 1
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-26 09:14 AM
>>Responses imported from previous forum
Reply From User: sbeadle, posted: 2019-07-23 13:42:18
You can use script to cause multiple registry changes (there are registry functions available within the script code).
Reply From User: hardin4019, posted: 2019-07-31 19:31:20
Thanks sbeadle, that works like a champ.
Reply From User: geoffpatton, posted: 2019-08-01 13:59:03
Why even use the registry? I just use vb script to change the visible property on mimic layers.
Reply From User: hardin4019, posted: 2019-08-01 14:09:28
Not sure that there isn't a better way of doing it... But for what I am doing, it works great. To be clear, I'm turning on the visibility of a single layer with the button and turning off the visibility of other layers if they are already on, but for multiple templated mimics, that are embedded into a single screen. Also it is nice that the registry is independent on each workstation since I have multiple work stations per system and do not want the layer visibility changing on the other work stations.
Reply From User: geoffpatton, posted: 2019-08-02 17:30:17
I use it on both layers and objects. Using the script is independent on each station, it does not change anything in the saved version of the mimic.
Actually when I tried using the registry it changed all the clients or maybe it was all web clients. I figured I might be doing something wrong, or it is because the WebX uses the server's registry. At the same time I figured out the Scripting and have not looked back at the registry. I prefer keeping things inside the software if I can also. I have had enough new IT rules mess with customers systems to be skeptical. I think that anything I do outside of the software increases the odds that IT will break something.
I have also used the state of variables to control visibility.
I love flexible software
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2019-11-26 09:14 AM
>>Responses imported from previous forum
Reply From User: sbeadle, posted: 2019-07-23 13:42:18
You can use script to cause multiple registry changes (there are registry functions available within the script code).
Reply From User: hardin4019, posted: 2019-07-31 19:31:20
Thanks sbeadle, that works like a champ.
Reply From User: geoffpatton, posted: 2019-08-01 13:59:03
Why even use the registry? I just use vb script to change the visible property on mimic layers.
Reply From User: hardin4019, posted: 2019-08-01 14:09:28
Not sure that there isn't a better way of doing it... But for what I am doing, it works great. To be clear, I'm turning on the visibility of a single layer with the button and turning off the visibility of other layers if they are already on, but for multiple templated mimics, that are embedded into a single screen. Also it is nice that the registry is independent on each workstation since I have multiple work stations per system and do not want the layer visibility changing on the other work stations.
Reply From User: geoffpatton, posted: 2019-08-02 17:30:17
I use it on both layers and objects. Using the script is independent on each station, it does not change anything in the saved version of the mimic.
Actually when I tried using the registry it changed all the clients or maybe it was all web clients. I figured I might be doing something wrong, or it is because the WebX uses the server's registry. At the same time I figured out the Scripting and have not looked back at the registry. I prefer keeping things inside the software if I can also. I have had enough new IT rules mess with customers systems to be skeptical. I think that anything I do outside of the software increases the odds that IT will break something.
I have also used the state of variables to control visibility.
I love flexible software
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-02 05:54 PM
Hi Guys
I exactly have the same issue, someone suggested to use scripts but problem is I have no idea how write and run scripts in GeoSCADA.
anyone can reply me the scripts or let me know where I can learn more about that?
appreciate in advance.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-13 08:20 AM
Look at the ViewX help in Core Reference > Coding > Scripting
This site can be helpful for general VBScript functions. https://www.w3schools.com/asp/asp_ref_vbscript_functions.asp
This thread might help you get going also.
https://community.se.com/t5/EcoStruxure-Geo-SCADA-Expert/Embedded-mimics/m-p/442354
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.