Scenario
Recording
Automation of creating
animation scripts.
Recorder allows saving rotations, movements and scaling of actors. All changes of your scene will be saved in a Scenario File (*.sc).
Note: For TurboCAD v6.5, only
rotations can be saved. For TurboCAD v7 - all options will work.
Now you can create animations of complex mechanical and human models
easily.
Just change the model in your drawing and press the button -
the program will generate the script with predefined number of
intermediate states and in accordance with the set law.
For more details, please see Manual -
Scenario Recorder and Tutorial -
Scenario recording
Parameterization
Support of
variables in the command parameters.
Your can change object's parameters in accordance
with a mathematical rule, or data from a file.
AnimationLab 1.0 allowed only numeric parameters and actor names to be
used in commands parameters. For example, Move 0, 0, 0. Version 2.0
allows using entire expressions, with arithmetic signs, and also
symbolic names of variables, e.g. Move 2*X, Y+2.5 , 0. In general,
any expression written in VBScript language (Microsoft Scripting
Technologies) can be a command parameter in 2.0.
Let's examine usage of parameterization for Move 2*X, Y+2.5 , 0
command.
X, Y variables should be described in Custom Script. See Pic. 1

Pic. 1
Custom Script is run before the start of each frame. In the example,
shown on Pic. 1, frame number (global variable StepNum) is assigned
to X variable, that is, it can have the values 0, 1, 2, 3….. Y
variable is increased by one at each frame.
To define such complex movement (along a parabola) without using
parameterization, it would be necessary to create a command for each
step:
Move 2, 3.5, 0
Move 4, 4.5, 0
Move 8, 54.5, 0
……………. etc.
Parameterization allows avoiding tiresome work of writing scenarios
with commands of the same type (like the one shown above), if laws
of parameters' changing are known.
Besides, VBScript provides a possibility to read data from the disk,
which is very convenient for entering parameters from tables; see
also
VBScript Support Enhancement.
Visual
Basic Script
Support
Enhancement
AnimationLab 2.0 provides the
possibility to create macros in VBScript language (Microsoft Scripting
Technologies) and save them in a drawing. Unlike version 1.0, you
can use VBScript macros not only in Custom Script Window, but also in
commands parameters
(see Parameterization.)
VBScript is a subset of Visual Basic language. In the area of using
TurboCAD SDK
objects, it has practically the same abilities as VBA (which is
distributed only with TurboCAD Pro version). See samples of VBScript
programs:
TurboCAD HTML Plugins
Global variables of
AnimationLab Custom Script :
ActiveDrawing - the currently active drawing. It is used
for accessing
TurboCAD SDK objects
For example, obtaining a Graphics object:
Dim Graphics
Set Graphics = ActiveDrawing.Graphics
StepCount - the total number of frames.
StepNum - the number of the current frame. Can have the
values 0, 1, 2…,(StepCount -1).
Example of Custom Script, which uses StepNum
Sub StepCustomAction
Alert StepNum
end sub
In the sample, a message with the frame number will be displayed in each
frame.

Pic: Message in the first frame.
ActorCount - the total number of actors.
PathCount - the total number of actors that are used as a
path.
Actors - an array of actors. Contains ActorCount of
elements. Array index values can have the values 0, 1, 2…,( ActorCount -1).
Each element is a record, which has the following fields: first -
actor-graphic ID, second - actor name.
Example of obtaining ID of the graphic and name of the first actor.
Sub StepCustomAction
Alert Actors(0)(0) 'Output of
the message with graphic ID
Alert Actors(0)(1) 'Output of
the message with actor name
end sub