Specifications
21
may know it from C++ or the Java language. Notice also that lines are terminated by semicolon ';'. Even the
lines with closing braces must be terminated by a semicolon. If you do no terminate with a semicolon, then
the statement continues on the next line. You can comment and uncomment a block of lines in one click by
means of the buttons at the top of the Editor window.
The only actual model element in the ArmModel is the declaration of the "AnyFixedRefFrame GlobalRef". All
models need a reference frame - a coordinate system - to work in, so the system has created one for you.
An AnyFixedRefFrame is a predefined data type you can use when you need it. What you have here is the
definition of an object of that type. The object gets the name "GlobalRef", and we can subsequently refer to
it anywhere in the ArmModel by that name.
You will notice that there is a "to do" comment inside the braces of this reference frame suggesting that you
add points for grounding the model. Don't do it just yet. We will return to this task later.
But here's an important notice: Everything you define in this tutorial from now on is part of the ArmModel
folder and should go between the its pair of braces. If you define something outside these braces that
should have been inside, then the necessary references between the elements of the model will not work.
What you have here is actually a valid AnyScript model, although it is empty and cannot do much. If you
have typed everything correctly, then you should be able to press the
icon and get the messages
Loading Main : "C:\...\NewModel1.any"
Scanning...
Parsing...
Constructing model tree...
Linking identifiers...
Evaluating constants...
Configuring model...
Evaluating model...
Loaded successfully.
Elapsed Time : 0.063000
in the Output Window. But what happens if you mistype something? If your typo leads to a syntactical error,
then it will be found by the AnyBody system when it parses the file, and instead of the "AnyScript loaded
successfully", you will get an impolite message that something is wrong. A common mistake is to forget a
semicolon somewhere. Try removing the last semicolon in the AnyScript file, and load again. You get a
message saying something like:
ERROR(SCR.PRS11) : C:\...\NewModel1.any(27) : 'EOF' unexpected
Model loading skipped










