Hi, I am new to AnyBody and I am currently testing the software with the one month trial (5 days left) on behalf of the University of Central Lancashire.
Slowly working my way through the tutorials and I am having problems with Lesson 1 - making things move with a pendulum.
I have followed the instructions at url http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/Making_things_move/lesson1.html
Here is my code
[SIZE=3]// Model for the “Making Things Move” tutorial.
[/SIZE]Main = {
[SIZE=3]// The actual body model goes in this folder
[/SIZE][SIZE=3]AnyFolder[/SIZE] MyModel = {
[SIZE=3]// Global Reference Frame
[/SIZE][SIZE=3]AnyFixedRefFrame[/SIZE] GlobalRef = {
}; [SIZE=3]// Global reference frame
[/SIZE]
[SIZE=3]AnySeg[/SIZE] Pendulum = {
Mass = 1;
Jii = {1, 0.01, 1}/15;
[SIZE=3]AnyRefNode[/SIZE] Origin = {
sRel = {0, 0.5, 0};
};
[SIZE=3]AnyRefNode[/SIZE] P1 = {
sRel = {0, -0.5, 0};
};
[SIZE=3]AnyDrawSeg[/SIZE] drw = {};
};
[SIZE=3]AnyKinMotion[/SIZE] JointDriver =
[SIZE=3]AnyRevoluteJoint[/SIZE] &Jnt = .Joint;
[SIZE=3]AnyFunPolynomial[/SIZE] DriverFun = {
PolyCoef = {{0, 3, 5}};
};
{
[SIZE=3]//MeasureOrganizer = {};
[/SIZE][SIZE=3]//CType = ;
[/SIZE][SIZE=3]//WeightFun = {};
[/SIZE][SIZE=3]//DriverPos0 = {};
[/SIZE][SIZE=3]//DriverVel0 = {};
[/SIZE][SIZE=3]//DriverAcc0 = {};
[/SIZE][SIZE=3]//AnyKinMeasure &<Insert name0> = <Insert object reference (or full object definition)>; You can make any number of these objects!
[/SIZE][SIZE=3]//AnyParamFun &<Insert name0> = <Insert object reference (or full object definition)>; You can make any number of these objects!
[/SIZE]};
[SIZE=3]AnyRevoluteJoint[/SIZE] Joint = {
[SIZE=3]AnyRefFrame[/SIZE] &Ground = .GlobalRef;
[SIZE=3]AnyRefFrame[/SIZE] &Pendulum = .Pendulum.Origin;
};
}; [SIZE=3]// MyModel
[/SIZE]
[SIZE=3]// The study: Operations to be performed on the model
[/SIZE][SIZE=3]AnyBodyStudy[/SIZE] MyStudy = {
[SIZE=3]AnyFolder[/SIZE] &Model = .MyModel;
Gravity = {0.0, -9.81, 0.0};
};
}; // Main
[SIZE=2]when I reload the model I get the following error msg
[SIZE=1][SIZE=1]ERROR(SCR.PRS23)[/SIZE] : [SIZE=1]C:/Users/b…i/AnyBody WIP/pendulum.any[/SIZE] : ‘JointDriver’ : Expression assignments are not allowed in declarations of AnyFolder objects
Model loading skipped
[SIZE=2]when I drill into this for an explanation I get
ERROR(SCR.PRS23) : ‘FileName(LineNo)’ : ‘TokenString’ : Expression assignments are not allowed in declarations of AnyFolder objects
Explanation:
Folder objects cannot be assigned with an expression. In this particular case, the error occur during in the declaration of the object. Maybe a reference operator is missing if you wanted to make a reference to another objects. Possible syntax:
<folder_class_name> &<reference_name> = <object_name (complete or relative)>;
<folder_class_name> <object_name> = { … };
where the former is a reference declaration and assignment and the latter is a folder declaration and assignment.
[SIZE=2]please help because I would like to move onto the next lessons before the trial expires
[/SIZE][/SIZE][/SIZE][/SIZE]