I need to display a confirmation box for changing mode. Please let me know whether we can store any text value in VBA script of deltav operate as we do in Control studio VB scripting.
Please find below the Deltav Operate script which I am working on :
Private Sub CommandButton14_Click()
'The Comments below have been added automatically.
'Any changes could cause adverse effects to the functionality
'of the Script Authoring Experts.
'WizardName=ToggleDigitalPoint
'Property1=DVSYS.A47010_CMPR_1/HS-6152.F_CV
'Property2=False
Dim RESPONSE As String
Dim CurrentMode As String
Dim LastMode As String
CurrentMode = frsreadvalue("DVSYS.A47010_CMPR_1/HS-6152.A_CV")
RESPONSE = MsgBox("Do you want to change mode from " & CurrentMode & " to " & LastMode & " ?", vbYesNo, "confirmation")
If RESPONSE = vbYes Then
ToggleDigitalPoint "DVSYS.A47010_CMPR_1/HS-6152.F_CV"
End If
LastMode = CurrentMode
End Sub
Please find below the Deltav Operate script :
In reply to AdrianOffield:
Thanks Adrian,
The Control studio parameter is a input parameter assigned to a Named set ( Auto/Man modes only). I am using digital toggle point to write 0 and 1 on the parameter whenever operator selects the commandbutton.
Please let me know if there is best way we can do this.
Is it best practise to use mode parameter instead of Named set?
Change the command button so that it opens the message box only, when you get the feedback from messagebox 1 or 0, then you execute the original command button code. (if answer is no-> end.)
Niklas Flykt
Klinkmann Oy
Key Account Manager safety products
nikfly@gmail.com