Upgrading Hardcoded Values in Animations
Position (horizontal/vertical) and dimension (height/width) properties for an animation within a picture that was upgraded to the Enhanced Coordinate System may not work as expected when you have hardcoded values that are either:
- Used in the Expression Builder for the position and dimensions animation of objects.
- Assigned via scripts for the position and dimensions of objects.
To upgrade the animation to work correctly, you must modify the animation with valid values for the Enhanced Coordinate System.
To modify the animation, perform one of the following:
- Change the hardcoded value in the Expression Editor to reflect the Enhanced Coordinates value in postscript points.
Place a sample script into the same picture that needs the hardcoded values updated. For example, the following sample script contains a value of 10 for the horizontal position:
Private Sub Rectl_Edit()
MsgBox Me.ConvertToEnhanced Coordinates (10, True)
EndSub
Then, replace the value in the Expression Editor for your animation with the value that displays in the message box.
NOTE: The script to derive the Enhanced Coordinate value must be placed under the same picture that requires the edits for the animation.
- Place Me.ConvertToEnhancedCoordinates( ) around the hardcoded value in a script.
For more information, see the example in the ConvertToEnhancedCoordinates Method Example section in the iFIX Automation Reference e-book.