Page 660 - ExtendSim User Guide
P. 660

634 Presentation
Animation
Step 2: Include an animation block in the model
Attach the Animate Value or Animate Item block (whichever is appropriate) to the output of the block you want to animate in the submodel. In the example to the right, The Animate Value block is used to animate the sum of the two water sources in the Water Sources hierarchical block.
The Animate Value block can be connected in parallel and
its output does not need to be connected, as shown in the
screen shot at right. However, items must pass through the
Animate Item block. That block cannot be connected in parallel and its output must be attached to the input of another block. Otherwise an item coming into the Animate Item block would have no way to exit.
Step 3: Select options in the animation block’s dialog
Animate Value block added to submodel
Choose the type of animation you want from the Specify icon ani- mation popup menu,
Enter the number of the anima- tion object that the block is to control in the Animation object number of enclosing H-block field. For example, to animate object number 1, enter “1” in the field.
☞ If the animation object number can- not be located on the hierarchical block’s icon, ExtendSim will search the icon of the next highest enclos- ing hierarchical block. If it still fails to locate that animation object num- ber, it will give an error message.
Animate Value dialog
If you create custom blocks, includ-
ing hierarchical blocks, use this same process to add animation objects to those blocks.
For an example of an animated hierarchical block, see the “Markov Chain Weather model” on page 52 or the “Animating Queue Contents model” on page 154 (that model is not available with ExtendSim CP.)
Animation functions
If you build your own blocks, ExtendSim offers a suite of functions to design how the block will animate. For example, the Planet Dance model (located in the folder \Examples\Continu- ous\Custom Block Models) shows three planets orbiting in space. Their orbits are determined by numbers entered in the blocks’ dialogs. See the Developer Reference for a description of the animation functions. Also, see “Animating a hierarchical block’s icon” on page 633 for an example of how to add animation to a block. You use that same process to add animation to any blocks you create.
How To


































































































   658   659   660   661   662