Hello Lu,
In the Controls example, SetResource method is used to push the value to the dial,
where the value is coming from the slider. Likewise, you can supply a random value to the
dial in a timer procedure:
viewport.SetResource( "Dial/Value", GlgRand( low, high ) );
A timer can be added using GlgAddTimeOut method.
Various GLG examples use a timer to animate the drawing with random values,
for example, the following examples may be used:
examples_mfc/animation
examples_mfc/TagsExample
While animation example uses object resources for animation, TagsExample uses tags to animate
the drawing. The details are provided in the GLG Animation Tutorial:
http://www.genlogic.com/doc_html/glgtut.htmlTo push a data value into a dial, you can use one of the following methods:
a) Use resource name "Dial/Value", where Dial is the object name in the .g file:
viewport.SetResource( "Dial/Value", GlgRand( low, high ) );
b) In the GLG Builder, you can add a tag to the dial's Value, and use the tag to
animate the dial. For example, for tag source defined as "DialTag":
viewport.SetTag( "DialTag", GlgRand( low, high ) );
Note that the resource "Dial/Value" is a string representing a hierarchical resource path,
while the tag "DialTag" is global to the drawing and does not have a hierarchy.
The use of tags is demonstrated in the examples_mfc/TagsExample.
Kind regards,
Generic Logic Team