I would like to turn layers on and off based on the login permissions. For example, if you are root (level 4), I want to turn on layer 7. If you are just a user (level 2) turn off layer 7. If you change users, the system should turn on/off the layers.
I am using Panel Topology, maybe there is a trick somewhere in there?
Todd Malone
HMI CoC USA
how to turn on/off layers based on login
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: how to turn on/off layers based on login
Todd,
Please note the permission bits are not a "level". They just indicate certain features that you want to enable/disable.
(Of course, no one will stop you to use them as a level but I think the 32 permission bits offer more flexibility then just a level)
No, there is no trick. You'll have to use scripting to turn the layers on or off (all by yourself)
Frenk
Please note the permission bits are not a "level". They just indicate certain features that you want to enable/disable.
(Of course, no one will stop you to use them as a level but I think the 32 permission bits offer more flexibility then just a level)
No, there is no trick. You'll have to use scripting to turn the layers on or off (all by yourself)
Frenk
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: how to turn on/off layers based on login
Hello,
as Frenk has already written you have to write your own script to show/hide layers.
At the settings for Cluttering/Decluttering (System Management --> Settings --> Cluttering/Decluttering) you can define at which zoom-level which layers shall be shown.
You have ton ensure that these settings do not override the settings you have made. Otherwise the user will see layers which shall not be shown.
Best Regards
Leopold Knipp
Senior Support Specialist
as Frenk has already written you have to write your own script to show/hide layers.
At the settings for Cluttering/Decluttering (System Management --> Settings --> Cluttering/Decluttering) you can define at which zoom-level which layers shall be shown.
You have ton ensure that these settings do not override the settings you have made. Otherwise the user will see layers which shall not be shown.
Best Regards
Leopold Knipp
Senior Support Specialist
- tmalone
- Posts:192
- Joined: Mon Nov 22, 2010 11:21 pm
Re: how to turn on/off layers based on login
what and where do I capture the event for login/logout for the UI manager?
If I am going to manage it myself with scripting, I need a way to know when the user changed. Where is that event?
If it appears in the manual, just give me the reference.
Todd
If I am going to manage it myself with scripting, I need a way to know when the user changed. Where is that event?
If it appears in the manual, just give me the reference.
Todd
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: how to turn on/off layers based on login
Todd,
There are two options here:
1) A 'basepanel' appears after your login panel. In this basepanel you do the layer magic. (This however wont work when you allow your user to logout and login without closing the basepanel)
2) In the basepanel you do a dpConnect() on "_UI_" + myManNum() + ".Username". This datapoint will trigger when a user has logged in or logged out
Good luck
Frenk
There are two options here:
1) A 'basepanel' appears after your login panel. In this basepanel you do the layer magic. (This however wont work when you allow your user to logout and login without closing the basepanel)
2) In the basepanel you do a dpConnect() on "_UI_" + myManNum() + ".Username". This datapoint will trigger when a user has logged in or logged out
Good luck
Frenk
- tmalone
- Posts:192
- Joined: Mon Nov 22, 2010 11:21 pm
Re: how to turn on/off layers based on login
sorry, sometimes I am not familiar with all aspects of the product. How do you allow or disallow the user to login/logout without closing the basepanel?
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: how to turn on/off layers based on login
Todd,
I'm pretty sure that the standard login panel has the possibility to keep the basepanel open, but I normally make my own login panel. The actually login panel is not mre than:
setUserId() and dpSet() to the _User datapoint.
This gives me a full control and it is up to me to do something with th ebasepanel.
1) Sometimes I leave the panel open, but controls, dpConnected() on the '_Username', make themselves grey (disabled)
2) Sometimes I close the base-panen and show something different
This all depends on the customer
Good luck
Frenk
I'm pretty sure that the standard login panel has the possibility to keep the basepanel open, but I normally make my own login panel. The actually login panel is not mre than:
setUserId() and dpSet() to the _User datapoint.
This gives me a full control and it is up to me to do something with th ebasepanel.
1) Sometimes I leave the panel open, but controls, dpConnected() on the '_Username', make themselves grey (disabled)
2) Sometimes I close the base-panen and show something different
This all depends on the customer
Good luck
Frenk