10/18/2017 6:15 PM | |
Joined: 9/23/2005 Last visit: 4/21/2025 Posts: 4406 Rating:
|
“Simple Samples” are small projects that demonstrate simple features. The target is give a quick overview about the theme and be used as start point for related discussions. Follow there are a short description and the configuration main steps. Description: In this simple sample, trend “Select trend” Button is activated by an external Button with help of a VB script. The principle of activating object button by VB script could be adapted to other objects:
Requirements: This example was made in TIA V14 SP1 up3, based on the “Simple sample” “WinCC Professional V13 SP1 – Simple Sample: Trends pen control by VB script” Scripting: The main point here is to use “ToolbarButtonClick” property. This property needs a reference number to work (ID). The referencing of a button with its ID does not depend on the actual order of the buttons. The ID are listed in the inspector window of the object under "Properties > Properties > Toolbar > Toolbar - Buttons". Example: This script simulate a click on button “Select Trend” (16) of the object "f(t) trend view_1": Sub OnClick(ByVal item) Dim aaa Set aaa = HMIRuntime.ActiveScreen.ScreenItems("f(t) trend view_1") aaa.ToolbarButtonClick=16 AttachmentProjectButtonByScript.zip (158 Downloads) |
Denilson Pegaia |
|
This contribution was helpful to
1 thankful Users |
Follow us on