Panel layers

Find and share HowTos to various installations / configurations!
Search

Post Reply
5 posts • Page 1 of 1
User avatar
mcmullan
Posts: 14
Joined: Mon Jan 31, 2011 9:18 am

Panel layers

Post by mcmullan » Tue Aug 02, 2011 4:36 pm

Does anyone know what the internal datapoint is that returns the value of the layers that are visible on a panel?

I am trying to get a script that will toggle between 2 different layers to hide or display certain objects.

User avatar
leoknipp
Posts: 2208
Joined: Tue Aug 24, 2010 5:28 pm

Re: Panel layers

Post by leoknipp » Wed Aug 03, 2011 6:37 am

Hello,

I do not know a datapoint-element where the active-layers are saved.
For toggling the layers you can use the ctrl-function SwitchLayer().

Best Regards
Leopold Knipp
Senior Support Specialist

User avatar
mcmullan
Posts: 14
Joined: Mon Jan 31, 2011 9:18 am

Re: Panel layers

Post by mcmullan » Wed Aug 03, 2011 1:04 pm

Hello,

Thank you for this infromation. I am aware of the SwitchLayer function and have tested with it. While you can use the control method to switch from say layer 3 and layer 4 it does not allow you to switch it back using the same button. To use this SwitchLayer function or the TurnOnLayer/TurnOffLayer function requires two buttons to do what I would like.
I have to have a button to hide layer 4 and then another button to display it.
What I am trying to do is hide a bunch of labels in a panel and then based upon a single button, either display them or hide them. This is for a maintnenance screen.

Thanks

Rick McMullan

User avatar
leoknipp
Posts: 2208
Joined: Tue Aug 24, 2010 5:28 pm

Re: Panel layers

Post by leoknipp » Thu Aug 04, 2011 1:22 pm

Hello,

you could use a global variable (defined at the scope lib of the panel) where you save the last state. When the button is clicked again the variable is read and the other layers are set visible/invisible.

Best Regards
Leopold Knipp

User avatar
mcmullan
Posts: 14
Joined: Mon Jan 31, 2011 9:18 am

Re: Panel layers

Post by mcmullan » Fri Aug 12, 2011 2:11 pm

Thank you Leo,

That helped.

Post Reply
5 posts • Page 1 of 1