Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84248members
353348posts

Changing Button Symbol Appearance Based On Current Mimic Name

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
dahoodman
Cadet
0 Likes
5
1468

Changing Button Symbol Appearance Based On Current Mimic Name

I am trying to change the properties of a button symbol based on the mimc that is open. For example, I have 5 menu buttons that open/navigate to other mimics via pick action hyperlink, but I want Button 1 to be yellow or disappear (in the code below) since the mimic that opens, is the one that is currently open. I'm not real handy with VB/Scripting.

 

I have the following in the Mimic Script

 

sub Mimic_Load()
   call ButtonMod()
end sub

 

sub ButtonMod()
   if Mimic.FullName = "SA.Sites.Overview.Communication Statistics Overview L1" then
      btn_Booster1.Visible = False
   else
      btn_Booster1.Visible = True
   end if
end sub

 

 

I know that the fullname property is correct as I've done a MsgBox and returned that name and the error happens at the success point where btn_Booster1.Visible happens. The error I get is "Object required: 'btn_Booster1'". And yes, there is a button symbol on the Mimic and its name is btn_Booster1.

 


Accepted Solutions
BevanWeiss
Spock
Spock
0 Likes
3
1454

Re: Changing Button Symbol Appearance Based On Current Mimic Name

As @geoffpatton recommends, use the Visible animation for this.

On the animations dialog...

 

It's where other people will expect such animations to be located.

 

 

As for your actual script, I've got a terrible memory for these things and the exact syntax.  But I believe you may have to specify the full path to the object, ie. with the appropriate layer also.

I thought there was an example for this in the help, but maybe it was in the Schneider training material.

 

I found it 🙂

 

file:///C:/ProgramData/Schneider%20Electric/ClearSCADA/Help_en-US/Content/ScriptingGuide/Mimic.Layers.htm%3FTocPath%3DCore%2520Reference%7CCoding%7CScripting%7CMimic%2520Functions%2520and%2520Properties%7CMimic%2520Properties%7CMimic.Layers%7C_____0

 

hmm... it seems copying the shortcut, or trying to Open in new Window with GeoSCADA help doesn't work...

You want the scripting section, and then Mimic Properties, and then Mimic.Layers

Core Reference > Coding > Scripting > Mimic.Layers

 

So you should be doing

Mimic.Layers("{NAME OF LAYER HERE}").Item("{NAME OF ITEM HERE"}).Visible = False

 

I just tested it.. and now I've lost a good button...


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..

See Answer In Context

geoffpatton
Commander
Commander
0 Likes
0
1450

Re: Changing Button Symbol Appearance Based On Current Mimic Name

Oh duh, I was thinking of writing to a database object.

 

Something like this

 

Mimic.Layers("Graphical").Item("ForcePoll").Visible = True

See Answer In Context

5 Replies 5
geoffpatton
Commander
Commander
0 Likes
0
1457

Re: Changing Button Symbol Appearance Based On Current Mimic Name

I would just use the Animations for Color and Visible and not a script.

 

But to answer your question you want 

 

btn_Booster1.Visible, False

BevanWeiss
Spock
Spock
0 Likes
3
1455

Re: Changing Button Symbol Appearance Based On Current Mimic Name

As @geoffpatton recommends, use the Visible animation for this.

On the animations dialog...

 

It's where other people will expect such animations to be located.

 

 

As for your actual script, I've got a terrible memory for these things and the exact syntax.  But I believe you may have to specify the full path to the object, ie. with the appropriate layer also.

I thought there was an example for this in the help, but maybe it was in the Schneider training material.

 

I found it 🙂

 

file:///C:/ProgramData/Schneider%20Electric/ClearSCADA/Help_en-US/Content/ScriptingGuide/Mimic.Layers.htm%3FTocPath%3DCore%2520Reference%7CCoding%7CScripting%7CMimic%2520Functions%2520and%2520Properties%7CMimic%2520Properties%7CMimic.Layers%7C_____0

 

hmm... it seems copying the shortcut, or trying to Open in new Window with GeoSCADA help doesn't work...

You want the scripting section, and then Mimic Properties, and then Mimic.Layers

Core Reference > Coding > Scripting > Mimic.Layers

 

So you should be doing

Mimic.Layers("{NAME OF LAYER HERE}").Item("{NAME OF ITEM HERE"}).Visible = False

 

I just tested it.. and now I've lost a good button...


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
geoffpatton
Commander
Commander
0 Likes
0
1451

Re: Changing Button Symbol Appearance Based On Current Mimic Name

Oh duh, I was thinking of writing to a database object.

 

Something like this

 

Mimic.Layers("Graphical").Item("ForcePoll").Visible = True

dahoodman
Cadet
0 Likes
0
1441

Re: Changing Button Symbol Appearance Based On Current Mimic Name

Thanks! That worked wonderfully!

dahoodman
Cadet
0 Likes
0
1440

Re: Changing Button Symbol Appearance Based On Current Mimic Name

Thanks! That worked wonderfully!