Sub OnMouseDown(x As Long, y As Long, flags As Long)
Dim MyPoint As New Point
Dim A() As Integer 'Declare the value array
Dim obj_var As GefObjectVariable
Dim pag, idx, db As String
Set obj_var = CimGetObject().GetVariable("DB")
db = obj_var.Value
Set obj_var = CimGetObject().GetVariable("INDICE")
idx = obj_var.Value
sleep 500
Select Case MsgBox("Sei sicuro di volere cambiare lo stato Simulazione???", vbYesNoCancel Or vbExclamation Or vbSystemModal Or vbDefaultButton1, "Warning")
Case vbYes
MsgBox "Lo stato simulazione è cambiato"
Case vbNo
MsgBox "Lo stato simulazione non è cambiato"
Case vbCancel
MsgBox "Operazione annullata"
MyPoint.id = "CPU313C."& db &"" 'SET BIT
MyPoint.Get 'Get the point value
MyPoint.GetArray A 'Transfer point element into array
A(idx) = 1 'Set the array
MyPoint.SetArray A 'Transfer array into the point
MyPoint.Set 'Transfer data to CIMPLICITY.
End Select
End Sub
In pratica se premo si deve fare questa operazione
MyPoint.id = "CPU313C."& db &"" 'SET BIT
MyPoint.Get 'Get the point value
MyPoint.GetArray A 'Transfer point element into array
A(idx) = 1 'Set the array
MyPoint.SetArray A 'Transfer array into the point
MyPoint.Set
con gli altri due no come posso fare?