20220802 iFix Initialize Picture
Mission:
While working with iFIX you want to initialize some variables while loading a picture.
But you can do other cool stuff too. See this documentation.
Solution:
VBA is your friend... again. Sit and relax.
Step 1 - Stop the workspace (press ctrl-w).Step 2 - Open the picture you want to initialize on.
Click right and goto the "Edit Script"-line.
Step 3 - At the top, enter the script in the "Initialize" part.
1. Be sure to open a private subroutine with the current iFIX picture to beinitialized.
2. In this example CFixPicture_Initialize.
3. Enter the desired code.
The code:
Private Sub CFixPicture_Initialize()
user.L1_ButtonIndex.CurrentValue = 0
user.L2_ButtonIndex.CurrentValue = 0
user.L3_ButtonIndex.CurrentValue = 0
End Sub