AnsweredAssumed Answered

PI ProcessBook VBA - One Click Method for Multiple Symbols

Question asked by MAMEDINA on Apr 28, 2016
Latest reply on Apr 29, 2016 by Steve Boyko

In PI ProcessBook 2014(v 3.4.0) - I have multiple symbols(composite/grouped symbol and text) which I have set to enable scripting and created on click events to call another function.  The on click event for these symbols is very similar and I would like to consolidate the code even further - see code below.  I would like to know if the following is possible in PI ProcessBook VBA markup:

  • Pass additional parameters to this composite symbol besides just X and Y cords.  I would like to know the name of they symbol that was clicked.
  • Follow up - Is it possible to create a single _Click event that I could use for multiple symbols being clicked: example:   Private Sub DefaultSymbol_Click(ByVal lvarX As Long, ByVal lvarY As Long) Handles AW101_Text.Click, AW101_Tank.Click

 

Private Sub AW101_Text_Click(ByVal lvarX As Long, ByVal lvarY As Long)
Call OpenPIProcessBook("AW", "101")
End Sub

Private Sub AW101_Tank_Click(ByVal lvarX As Long, ByVal lvarY As Long)
Call OpenPIProcessBook("AW", "101")
End Sub

 

 

Private Sub AW102_Tank_Click(ByVal lvarX As Long, ByVal lvarY As Long)
  Call OpenPIProcessBook("AW", "102")
End Sub
Private Sub AW102_Text_Click(ByVal lvarX As Long, ByVal lvarY As Long)
Call OpenPIProcessBook("AW", "102")
End Sub

 

Thanks,

 

-Marco

Outcomes