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
I believe the only way to achieve this is to hide the enture toolbar (there's a property for this but I don't remember its name). I'm not sure if it is possible to hide or disable individual commands.
I second this, only the full top line tool bar can be hidden, individual commands cant be disabled
Hi Richard, thanks for the reply. I did have a look for such a property but couldn't find anything.
Do you know how to hide the toolbar ?
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
I did manage to find the exact solution for you as well!
As mentioned, the trend control includes a lot of trial and error since it contains a VAST number of properties and functions. Most of them undocumented.
And to be honest when I personally need to do something with it, I use autocomplete or the property list, adding some patience and luck ;)
Using the above mentioned method this morning i stumbled upon an interesting function!
.SetToolbarButtonEnabled
Using this you can individually enable or disable buttons in the toolbar!
'This will disable the Open button
aaTrendControl1.SetToolbarButtonEnabled(0,0);
'This will disable the Save button
aaTrendControl1.SetToolbarButtonEnabled(1,0);
'This will disable the Print button
aaTrendControl1.SetToolbarButtonEnabled(2,0);
'This will disable the Copy button
aaTrendControl1.SetToolbarButtonEnabled(3,0);
'This will disable the Servers button
aaTrendControl1.SetToolbarButtonEnabled(4,0);
'.... And so on
So obvious now that we know about it.
So thanks David for asking, now we know it IS possible. And of course we want to do this is in some scenarios!
rickard.norin Heroes HQ, making the impossible, possible!
Thanks Richard,
I just couldn't find the anything in the bindings that made sense to me. I thought it would be possible to hide the whole tool bar which would have been ok but not perfect. As you say now I see it it is rather obvious.
Thanks again Richard Köhlerstrand you're a star. I will be able to finish migration of the system now. Will let you know if I have anything else I can't figure out.
Davie