Hi all,
I am using the aaTrendControl to access data from our Historian and I need to disable \ restrict access to the file load, file save and server config icons, see below. Anyone done this before or know how to ?
Thanks in advance
Hi all,
I am using the aaTrendControl to access data from our Historian and I need to disable \ restrict access to the file load, file save and server config icons, see below. Anyone done this before or know how to ?
Thanks in advance
Hi David.
Expecting that you use the .Net version the aaTrendControl embedded in a Industrial Graphics Symbol.
There are several properties available in the editor where you can set various settings related to the functionality of the trend.
But some has to be set using a reference or scripting.
Here are a collection of some examples that i have created in some different scenarios.
But this will Hide the Toolbar, you could set it in the OnShow script of the symbol, (and if needed you can have it appear based on logic).
Result:
Example of a Property set in DataBinding, linked to a CustomPropery
Some various script examples
' ------------------------------------------------------ ' Connects to Historian and ' set trend properties ' ' Written by: Richard Köhlerstrand ' Company: Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ 'Connect to trend using CP parameters and remember session password aaTrendControl1.AddServerEx(Srv,Usr,Pwd,TRUE); 'Set live Mode aaTrendControl1.Trend.LiveMode = TRUE; 'Remove Tag picker toolbox aaTrendControl1.TagPicker.Visible = FALSE; 'Remove top toolbar aaTrendControl1.ToolBarVisible = FALSE; 'Remove Time toolbar aaTrendControl1.TimeBarVisible = FALSE; 'Remove Grid aaTrendControl1.GridVisible = FALSE; 'Remove XAxis aaTrendControl1.ShowXAxisCursors = FALSE; 'Remove YAxis aaTrendControl1.ShowYAxisCursor = FALSE; ' ------------------------------------------------------ ' Add the required pens to trend ' ' Written by: Richard Köhlerstrand ' Company: Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ IF InstanceName <> "" Then IF Pen1 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen1, 0); ENDIF; IF Pen2 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen2, 0); ENDIF; IF Pen3 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen3, 0); ENDIF; IF Pen4 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen4, 0); ENDIF; IF Pen5 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen5, 0); ENDIF; ENDIF; ' ------------------------------------------------------ ' Calculate duration in milliseconds ' ' Written by: Richard Köhlerstrand ' Company:Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ '(Tag for duration linked to control) Duration = DTime * 1000; ' ------------------------------------------------------ ' Alternative quick logon, show filter ' ' Written by: Richard Köhlerstrand ' Company:Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ if Server <> "" then aaTrendControl1.AddServerEx(Server,"","",true); aaTrendControl1.TagPicker.FilterVisible = true; aaTrendControl1.Servers.QuickLogon(); endif;
The documentation that I have located is the AVEVA Trend Client Control User Guide, TrendClient.pdf)
I must say that this control is one of the most populated properties that i have seen, and just scrolling through them takes forever, so I must say that I always thought that everything is possible here, I just need to find the right property!
And if you remove the toolbar I expect you could create your own buttons triggering the same functionality as needed.
I hope it helps.
Richard
Hi David.
Expecting that you use the .Net version the aaTrendControl embedded in a Industrial Graphics Symbol.
There are several properties available in the editor where you can set various settings related to the functionality of the trend.
But some has to be set using a reference or scripting.
Here are a collection of some examples that i have created in some different scenarios.
But this will Hide the Toolbar, you could set it in the OnShow script of the symbol, (and if needed you can have it appear based on logic).
Result:
Example of a Property set in DataBinding, linked to a CustomPropery
Some various script examples
' ------------------------------------------------------ ' Connects to Historian and ' set trend properties ' ' Written by: Richard Köhlerstrand ' Company: Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ 'Connect to trend using CP parameters and remember session password aaTrendControl1.AddServerEx(Srv,Usr,Pwd,TRUE); 'Set live Mode aaTrendControl1.Trend.LiveMode = TRUE; 'Remove Tag picker toolbox aaTrendControl1.TagPicker.Visible = FALSE; 'Remove top toolbar aaTrendControl1.ToolBarVisible = FALSE; 'Remove Time toolbar aaTrendControl1.TimeBarVisible = FALSE; 'Remove Grid aaTrendControl1.GridVisible = FALSE; 'Remove XAxis aaTrendControl1.ShowXAxisCursors = FALSE; 'Remove YAxis aaTrendControl1.ShowYAxisCursor = FALSE; ' ------------------------------------------------------ ' Add the required pens to trend ' ' Written by: Richard Köhlerstrand ' Company: Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ IF InstanceName <> "" Then IF Pen1 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen1, 0); ENDIF; IF Pen2 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen2, 0); ENDIF; IF Pen3 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen3, 0); ENDIF; IF Pen4 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen4, 0); ENDIF; IF Pen5 <> "" THEN aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen5, 0); ENDIF; ENDIF; ' ------------------------------------------------------ ' Calculate duration in milliseconds ' ' Written by: Richard Köhlerstrand ' Company:Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ '(Tag for duration linked to control) Duration = DTime * 1000; ' ------------------------------------------------------ ' Alternative quick logon, show filter ' ' Written by: Richard Köhlerstrand ' Company:Roima Sverige AB ' Edited by: ' Last edited: ' ------------------------------------------------------ if Server <> "" then aaTrendControl1.AddServerEx(Server,"","",true); aaTrendControl1.TagPicker.FilterVisible = true; aaTrendControl1.Servers.QuickLogon(); endif;
The documentation that I have located is the AVEVA Trend Client Control User Guide, TrendClient.pdf)
I must say that this control is one of the most populated properties that i have seen, and just scrolling through them takes forever, so I must say that I always thought that everything is possible here, I just need to find the right property!
And if you remove the toolbar I expect you could create your own buttons triggering the same functionality as needed.
I hope it helps.
Richard