Show actual user name in XttGraph

More
1 day 22 hours ago #381 by Foxman
Hi all,

does anyone know a way to show the actual user in a XttGraph? 

/Martin

Please Log in or Create an account to join the conversation.

More
3 hours 32 minutes ago #383 by claes
Hi Martin,

It’s possible with the script function GetUser() and by using an extern declared variable.

Use a value field and add dynamics DigScript. Insert this text into DigScript.Script

extern string current_user;
current_user = GetUser();

To continuously execute the script create a Dv that is always true and connect DigScript.Attribute to this Dv. Also set DigScript.Level to 1.

Connect the Value dynamics to the extern variable by setting Value.Attribute to $ccm.current_user##String80.

/Claes

Please Log in or Create an account to join the conversation.

More
10 minutes ago #385 by Foxman
Hi Claes,

thanks for your advice. It's $ccm that does the magic.

But I have a strange behavior:

Everything looks fine, as long as I call the operator environment from the runtime monitor on the engineering station (attachement 1). But when I run rt_xtt -q <OpPlace> on the engineering station (Ubuntu 22.04, ProviewR 5.9.0-2) or on the production system (Debian 11, ProviewR 5.9.0-2), the username stays empty (attachement 2). When I then open the header as a standalone window, it works as expected.

The header.pwg is normally embedded in an XttMultiView.

Any suggestions?

/Martin

     

Please Log in or Create an account to join the conversation.

Time to create page: 0.910 seconds
Powered by Kunena Forum