Question:
How can I create an analog clock using objects from E3?
Solution:
To do so, you must use Ellipse and Line objects to draw the clock. In the Lines representing the hands, select the Rotation slider option and set the initial and final points of the movement.
To animate the hours’ hands, set RangeMin and RangeMax properties to 0 and 12, respectively. To animate the minutes’ and seconds’ hands, set RangeMin and RangeMax properties to 1 and 60, respectively.
After that, create a Demo Tag and seti it up it as CurrentTime to perform the following:
- In the animation of the seconds’ hand, create a simple link with second(DemoTag.Value).
- In the animation of the minutes’ hand, create a simple link with minute(Tag.DemoTag.Value).
- In the animation of the hours’ hand, create a multiple link comparing the hour’s value to 12, in order to change it to AM and PM.