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.
Panel layers
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Panel layers
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
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
- mcmullan
- Posts:16
- Joined: Mon Jan 31, 2011 10:18 am
Re: Panel layers
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
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
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Panel layers
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
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
- mcmullan
- Posts:16
- Joined: Mon Jan 31, 2011 10:18 am
Re: Panel layers
Thank you Leo,
That helped.
That helped.