VBA for Proficy Ifix syntax application.caller?

Sitrean

Member
Join Date
Jun 2018
Location
New York
Posts
1
I have an HMI based on Proficy Ifix 5.5 which contains a header, footer, and main screen. the footer contains a panel of navigating buttons which change the screens of the main screen. there are approximately 50 buttons, which I have had to modify one by one on enough occasions that I've got keyboard marks permanently embedded in my forehead from repeat concussive therapy.

I am looking for an elegant solution which names the button (which is a .jpg) the same name as the screen (for instance BCP) and the VB script can compare the button name and compare it to the .grf

Code:
Private Sub BCP_Click()
On Error GoTo ErrorHandler
Dim x As String

x = Me.Name 'should be the button name "BCP"

If x <> user.globalPicFileCurrent.CurrentValue Then
    replacepicture "bcp", user.globalPicFileCurrent.CurrentValue                    'REPLACEPIC * N3PUMPS
    user.GlobalHeadBack.CurrentValue = user.GlobalHeadCurrent.CurrentValue
    user.GlobalFootBack.CurrentValue = user.GlobalFootCurrent.CurrentValue
Else
End If

    Exit Sub
ErrorHandler:
    HandleError
End Sub
fyi: the GlobalPicFileCurrent is the variable when the picture initializes to hold the name of the current picture. variations head stand for the header, foot for footer, and back is the previous picture to enable a back button which is 50% effective.
 

Similar Topics

Hi. I have a Proficy iFIX V5.8 & V5.5 & V3.5. In the iFIX WorkSpace V5.5, V5.8 can open multiple instances of a single picture: OpenPicture &...
Replies
0
Views
3,106
I am trying to simply display a PLC string tag value (text) in a VBA control (msgbox or anything...just to get it working). The following code is...
Replies
2
Views
5,890
I have a Proficy iFIX 5.8 application running on a Win 7 Embedded OS with a touch screen. I am looking for a way to perform a controlled shutdown...
Replies
1
Views
2,787
Regarding Proficy iFIX 5.8...is there a way to access the properties of an object that is located on Picture "A" from the VBA code on Picture...
Replies
6
Views
6,313
Hi guys, This may be veering off the 'automation/PLC' path a little...but has anyone had experience with interfacing excel with Historian Servers...
Replies
1
Views
2,565
Back
Top Bottom