Specifications
20
in the Main Frame toolbar and the key F7 is a convennient shortcut for this function.
The script to model operation also saves your model files. The first time you save a new file, AnyBody
requires you to give your model a name, so clicking the
icon the first time produces a "Save As"
dialog.
Let's have a look at what the system has generated for you. If we forget about most of the text and
comments, the overall structure of the model looks like this:
Main = {
AnyFolder MyModel = {
}; // MyModel
AnyBodyStudy MyStudy = {
};
}; // Main
What you see is a hierarchy of braces - just like in a C, C++, or Java computer program. The outermost pair
of braces is named "Main". Everything else in the model goes between these braces.
Right now, there are two other sections inside the Main braces: The "AnyFolder MyModel" and the
"AnyBodyStudy MyStudy". These are the two basic elements of most AnyBody models. The term "AnyFolder"
is very general. In fact, any pair of braces in AnyScript is a folder. You can think of a folder as a directory on
your hard disk. A directory can contain other directories and files. It's exactly the same with folders. They
can contain other folders and elements of the model. The "AnyFolder MyModel" is the folder containing the
entire model you are going to build. The name "MyModel" can be changed by you to anything you like. In
fact, let's change it to ArmModel (in the forthcoming AnyScript text we'll highlight each change by red. Just
type the new name into the file, and don't forget to also change other occurrences of MyModel to ArmModel
in the file.
Notice the prefix "Any". All reserved words in AnyScript begin with "Any". This way you can distinguish the
elements that belong to the system from what the user defines. Another way of recognizing reserved words
is by virtue of their color in the editor. Class names are recognized by the editor as soon as you type them
and colored blue.
It must be emphasized that AnyScript is case sensitive.
There is more to an AnyScript file than the model. Once you have a model, you can perform various
operations on it. These operations are often collected in "studies", and the "AnyBodyStudy MyStudy" is
indeed such a study. You can think of a study as the definition of a task or set of tasks to perform. The
study also contains methods to perform the tasks. The Study of Studies
tutorial contains much more
information about these subjects. For now, let's just rename "MyStudy" to "ArmModelStudy".
Let's look a little closer at the contents of what is now the ArmModel folder:
// The actual body model goes in this folder
AnyFolder ArmModel = {
// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
// Todo: Add points for grounding
// of the model here
}; // Global reference frame
// Todo. Add the model elements such as
// segments, joints, and muscles here.
}; // ArmModel
Most of what you see above is just comments. It is always useful to add lots of comments to your models.










