--- a
+++ b/Tools/AnyMocap/OptimizeAnthropometricsOnOff.any
@@ -0,0 +1,598 @@
+#ifndef _ANYMOCAP_OPTIMIZE_ANTHROPOMETRICS_ON_OFF_ANY_
+#define _ANYMOCAP_OPTIMIZE_ANTHROPOMETRICS_ON_OFF_ANY_
+/*
+---
+group: MoCap
+topic: Parameter Identification
+descr: |
+  Class template for making design variables and optimizing the anthropometric
+  of the model. I.e. adding different segment length to the parameter identification 
+  study.
+---
+
+To use these drivers import the file:
+#include "<AMMR_TOOLS>/AnyMoCap/OptimizeAnthropometricsOnOff.any"
+
+See the individual classes for more information.
+
+*/
+  
+
+// Creates design variables based on anthropometrics of the model and 
+// adds them to the parameter identification study. 
+//
+// In the example below the rhythm constrains two DOFs of the arm to move in a 1:4 ratio.
+//
+// :::{rubric} Example
+// :::
+//
+// :::{code-block} AnyScriptDoc
+//
+// OptimizeAnthropometricsOnOff OptAnthropometrics (
+//   PELVIS_WIDTH = ON , 
+//   HEAD_HEIGHT = OFF, 
+//   TRUNK_HEIGHT= ON, 
+// ) ={};
+//
+//:::
+//
+#class_template OptimizeAnthropometricsOnOff (
+  PELVIS_WIDTH=0,
+  PELVIS_HEIGHT=0,
+  PELVIS_DEPTH=0,
+  HEAD_HEIGHT =0,
+  HEAD_WIDTH=0,
+  HEAD_DEPTH=0,
+  TRUNK_HEIGHT = 0,
+  TRUNK_WIDTH=0,
+  TRUNK_DEPTH=0,
+  NECK_LENGTH=0,
+  RIGHT_THIGH_LENGTH =0,
+  LEFT_THIGH_LENGTH =0,
+  RIGHT_SHANK_LENGTH =0,
+  LEFT_SHANK_LENGTH =0,
+  RIGHT_FOOT_LENGTH =0,
+  LEFT_FOOT_LENGTH =0,
+  RIGHT_UPPERARM_LENGTH =0,
+  LEFT_UPPERARM_LENGTH =0,
+  RIGHT_LOWERARM_LENGTH =0,
+  LEFT_LOWERARM_LENGTH =0,
+  RIGHT_HAND_LENGTH = 0,
+  LEFT_HAND_LENGTH = 0,
+  RIGHT_HAND_BREADTH = 0,
+  LEFT_HAND_BREADTH = 0,
+  RIGHT_VARUS_VALGUS = 0,
+  LEFT_VARUS_VALGUS = 0,
+  RIGHT_TIBIAL_TORSION = 0,
+  LEFT_TIBIAL_TORSION = 0,
+  LEFT_RIGHT_SYMMETRY = 0,
+  PARAMETER_OPT_STUDY = Main.Studies.ParameterIdentification,
+  SEGMENTS_LENGTHS = Main.HumanModel.Anthropometrics.SegmentDimensions,
+  HUMAN_MODEL_FOLDER = Main.HumanModel,
+  CREATE_ALL_DESVARS=0
+  ){
+  
+// Arguments
+// OptimizeAnthropometricsOnOff#PELVIS_WIDTH
+//   If set to ON, the pelvis width is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#PELVIS_HEIGHT
+//   If set to ON, the pelvis height is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#PELVIS_DEPTH
+//   If set to ON, the pelvis depth is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#HEAD_HEIGHT
+//   If set to ON, the head height is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#HEAD_WIDTH
+//   If set to ON, the head width is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#HEAD_DEPTH
+//   If set to ON, the head depth is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#TRUNK_HEIGHT
+//   If set to ON, the trunk height is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#TRUNK_WIDTH
+//   If set to ON, the trunk width is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#TRUNK_DEPTH
+//   If set to ON, the trunk depth is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#NECK_LENGTH
+//   If set to ON, the neck length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_THIGH_LENGTH
+//   If set to ON, the right thigh length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_THIGH_LENGTH
+//   If set to ON, the left thigh length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_SHANK_LENGTH
+//   If set to ON, the right shank length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_SHANK_LENGTH
+//   If set to ON, the left shank length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_FOOT_LENGTH
+//   If set to ON, the right foot length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_FOOT_LENGTH
+//   If set to ON, the left foot length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_UPPERARM_LENGTH
+//   If set to ON, the right upper arm length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_UPPERARM_LENGTH
+//   If set to ON, the left upper arm length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_LOWERARM_LENGTH
+//   If set to ON, the right lower arm length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_LOWERARM_LENGTH
+//   If set to ON, the left lower arm length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_HAND_LENGTH
+//   If set to ON, the right hand length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_HAND_LENGTH
+//   If set to ON, the left hand length is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_HAND_BREADTH
+//   If set to ON, the right hand breadth is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_HAND_BREADTH
+//   If set to ON, the left hand breadth is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_VARUS_VALGUS
+//   If set to ON, the right varus valgus is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_VARUS_VALGUS
+//   If set to ON, the left varus valgus is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#RIGHT_TIBIAL_TORSION
+//   If set to ON, the right tibial torsion is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_TIBIAL_TORSION
+//   If set to ON, the left tibial torsion is added as a design variable to the parameter identification study.
+// OptimizeAnthropometricsOnOff#LEFT_RIGHT_SYMMETRY
+//   If set to On, constraints are added to the parameter identification study to ensure that the left and right
+//   side of the body are symmetric.
+// OptimizeAnthropometricsOnOff#PARAMETER_OPT_STUDY
+//   The name of the parameter identification study. Can be used in advanced cases with
+//   multiple parameter identification studies.
+// OptimizeAnthropometricsOnOff#SEGMENTS_LENGTHS
+//   The name of the folder containing the segment lengths. Can be used in advanced cases with
+//   multiple Human Models.
+// OptimizeAnthropometricsOnOff#HUMAN_MODEL_FOLDER
+//   The name of the folder containing the Human Model. Can be used in advanced cases with
+//   multiple Human Models.
+// OptimizeAnthropometricsOnOff#CREATE_ALL_DESVARS
+//   If set to ON, all the desvars are created. Design vars are still only added 
+//   to the parameter identification study if the corresponding arguments are set to ON.
+
+
+  // These should be set as default values in the argument to the template                                              
+  Main.ModelSetup.ParameterIdentification =
+  {    
+    #if CREATE_ALL_DESVARS | PELVIS_WIDTH
+    AnyDesVar PelvisWidth = {
+      Val = SEGMENTS_LENGTHS.PelvisWidth;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if PELVIS_WIDTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& PelvisWidth = Main.ModelSetup.ParameterIdentification.PelvisWidth; };
+    #endif
+       
+    #if CREATE_ALL_DESVARS | PELVIS_HEIGHT
+    AnyDesVar PelvisHeight = {
+      Val = SEGMENTS_LENGTHS.PelvisHeight;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if PELVIS_HEIGHT
+    PARAMETER_OPT_STUDY = { AnyDesVar& PelvisHeight = Main.ModelSetup.ParameterIdentification.PelvisHeight; };
+    #endif    
+    
+    #if CREATE_ALL_DESVARS | PELVIS_DEPTH
+    AnyDesVar PelvisDepth = {
+      Val = SEGMENTS_LENGTHS.PelvisDepth;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if PELVIS_DEPTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& PelvisDepth = Main.ModelSetup.ParameterIdentification.PelvisDepth; };
+    #endif       
+    
+    #if CREATE_ALL_DESVARS | HEAD_HEIGHT
+    AnyDesVar HeadHeight = {
+      Val = SEGMENTS_LENGTHS.HeadHeight;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if HEAD_HEIGHT
+    PARAMETER_OPT_STUDY = { AnyDesVar& HeadHeight = Main.ModelSetup.ParameterIdentification.HeadHeight; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | HEAD_WIDTH
+    AnyDesVar HeadWidth = {
+      Val = SEGMENTS_LENGTHS.HeadWidth;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if HEAD_WIDTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& HeadWidth = Main.ModelSetup.ParameterIdentification.HeadWidth; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | HEAD_DEPTH
+    AnyDesVar HeadDepth = {
+      Val = SEGMENTS_LENGTHS.HeadDepth;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if HEAD_DEPTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& HeadDepth = Main.ModelSetup.ParameterIdentification.HeadDepth; };
+    #endif    
+    
+    #if CREATE_ALL_DESVARS | NECK_LENGTH
+    AnyDesVar NeckLength = {
+      Val = SEGMENTS_LENGTHS.NeckLength;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if NECK_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& NeckLength = Main.ModelSetup.ParameterIdentification.NeckLength; };
+    #endif        
+    
+    
+    #if CREATE_ALL_DESVARS | TRUNK_HEIGHT
+    AnyDesVar TrunkHeight = {
+      Val = SEGMENTS_LENGTHS.TrunkHeight;
+      Min = 0.1;
+      Max = 1.5;
+    };
+    #endif
+    #if TRUNK_HEIGHT
+    PARAMETER_OPT_STUDY = { AnyDesVar& TrunkHeight = Main.ModelSetup.ParameterIdentification.TrunkHeight; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | TRUNK_WIDTH
+    AnyDesVar TrunkWidth = {
+      Val = SEGMENTS_LENGTHS.TrunkWidth;
+      Min = 0.1;
+      Max = 1.5;
+    };
+    #endif
+    #if TRUNK_WIDTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& TrunkWidth = Main.ModelSetup.ParameterIdentification.TrunkWidth; };
+    #endif     
+    
+    #if CREATE_ALL_DESVARS | TRUNK_DEPTH
+    AnyDesVar TrunkDepth = {
+      Val = SEGMENTS_LENGTHS.TrunkDepth;
+      Min = 0.1;
+      Max = 1.5;
+    };
+    #endif
+    #if TRUNK_DEPTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& TrunkDepth = Main.ModelSetup.ParameterIdentification.TrunkDepth; };
+    #endif       
+    
+    #if CREATE_ALL_DESVARS | RIGHT_THIGH_LENGTH
+    AnyDesVar RightThighLength = {
+      Val = SEGMENTS_LENGTHS.Right.ThighLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if RIGHT_THIGH_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightThighLength = Main.ModelSetup.ParameterIdentification.RightThighLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_THIGH_LENGTH
+    AnyDesVar LeftThighLength = {
+      Val = SEGMENTS_LENGTHS.Left.ThighLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if LEFT_THIGH_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftThighLength = Main.ModelSetup.ParameterIdentification.LeftThighLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_THIGH_LENGTH & LEFT_THIGH_LENGTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure ThighLengthSymmetry = {
+      Val = .LeftThighLength.Val - .RightThighLength.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_THIGH_LENGTH & LEFT_THIGH_LENGTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& ThighLengthSymmetry = Main.ModelSetup.ParameterIdentification.ThighLengthSymmetry; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | RIGHT_SHANK_LENGTH
+    AnyDesVar RightShankLength = {
+      Val = SEGMENTS_LENGTHS.Right.ShankLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if RIGHT_SHANK_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightShankLength = Main.ModelSetup.ParameterIdentification.RightShankLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_SHANK_LENGTH
+    AnyDesVar LeftShankLength = {
+      Val = SEGMENTS_LENGTHS.Left.ShankLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if LEFT_SHANK_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftShankLength = Main.ModelSetup.ParameterIdentification.LeftShankLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_SHANK_LENGTH & LEFT_SHANK_LENGTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure ShankLengthSymmetry = {
+      Val = .LeftShankLength.Val - .RightShankLength.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_SHANK_LENGTH & LEFT_SHANK_LENGTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& ShankLengthSymmetry = Main.ModelSetup.ParameterIdentification.ShankLengthSymmetry; };
+    #endif
+    
+    
+    #if CREATE_ALL_DESVARS | RIGHT_FOOT_LENGTH
+    AnyDesVar RightFootLength = {
+      Val = SEGMENTS_LENGTHS.Right.FootLength;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if RIGHT_FOOT_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightFootLength = Main.ModelSetup.ParameterIdentification.RightFootLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_FOOT_LENGTH
+    AnyDesVar LeftFootLength = {
+      Val = SEGMENTS_LENGTHS.Left.FootLength;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if LEFT_FOOT_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftFootLength = Main.ModelSetup.ParameterIdentification.LeftFootLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_FOOT_LENGTH & LEFT_FOOT_LENGTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure FootLengthSymmetry = {
+      Val = .LeftFootLength.Val - .RightFootLength.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_FOOT_LENGTH & LEFT_FOOT_LENGTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& FootLengthSymmetry = Main.ModelSetup.ParameterIdentification.FootLengthSymmetry; };
+    #endif    
+    
+    
+    
+    #if CREATE_ALL_DESVARS | RIGHT_UPPERARM_LENGTH
+    AnyDesVar RightUpperArmLength = {
+      Val = SEGMENTS_LENGTHS.Right.UpperArmLength;
+      Min = 0.01;
+      Max = 1;
+    };
+    #endif
+    #if RIGHT_UPPERARM_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightUpperArmLength = Main.ModelSetup.ParameterIdentification.RightUpperArmLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_UPPERARM_LENGTH
+    AnyDesVar LeftUpperArmLength = {
+      Val = SEGMENTS_LENGTHS.Left.UpperArmLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if LEFT_UPPERARM_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftUpperArmLength = Main.ModelSetup.ParameterIdentification.LeftUpperArmLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_UPPERARM_LENGTH & LEFT_UPPERARM_LENGTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure UpperArmLengthSymmetry = {
+      Val = .LeftUpperArmLength.Val - .RightUpperArmLength.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_UPPERARM_LENGTH & LEFT_UPPERARM_LENGTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& UpperArmLengthSymmetry = Main.ModelSetup.ParameterIdentification.UpperArmLengthSymmetry; };
+    #endif    
+        
+    
+    #if CREATE_ALL_DESVARS | RIGHT_LOWERARM_LENGTH
+    AnyDesVar RightLowerArmLength = {
+      Val = SEGMENTS_LENGTHS.Right.LowerArmLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if RIGHT_LOWERARM_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightLowerArmLength = Main.ModelSetup.ParameterIdentification.RightLowerArmLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_LOWERARM_LENGTH
+    AnyDesVar LeftLowerArmLength = {
+      Val = SEGMENTS_LENGTHS.Left.LowerArmLength;
+      Min = 0.1;
+      Max = 1;
+    };
+    #endif
+    #if LEFT_LOWERARM_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftLowerArmLength = Main.ModelSetup.ParameterIdentification.LeftLowerArmLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_LOWERARM_LENGTH & LEFT_LOWERARM_LENGTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure LowerArmLengthSymmetry = {
+      Val = .LeftLowerArmLength.Val - .RightLowerArmLength.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_LOWERARM_LENGTH & LEFT_LOWERARM_LENGTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& LowerArmLengthSymmetry = Main.ModelSetup.ParameterIdentification.LowerArmLengthSymmetry; };
+    #endif    
+        
+   
+    #if CREATE_ALL_DESVARS | RIGHT_HAND_LENGTH
+    AnyDesVar RightHandLength = {
+      Val = SEGMENTS_LENGTHS.Right.HandLength;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if RIGHT_HAND_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightHandLength = Main.ModelSetup.ParameterIdentification.RightHandLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_HAND_LENGTH
+    AnyDesVar LeftHandLength = {
+      Val = SEGMENTS_LENGTHS.Left.HandLength;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if LEFT_HAND_LENGTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftHandLength = Main.ModelSetup.ParameterIdentification.LeftHandLength; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_HAND_LENGTH & LEFT_HAND_LENGTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure HandLengthSymmetry = {
+      Val = .LeftHandLength.Val - .RightHandLength.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_HAND_LENGTH & LEFT_HAND_LENGTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& HandLengthSymmetry = Main.ModelSetup.ParameterIdentification.HandLengthSymmetry; };
+    #endif    
+    
+    
+    
+    #if CREATE_ALL_DESVARS | RIGHT_HAND_BREADTH
+    AnyDesVar RightHandBreadth = {
+      Val = SEGMENTS_LENGTHS.Right.HandBreadth;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if RIGHT_HAND_BREADTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightHandBreadth = Main.ModelSetup.ParameterIdentification.RightHandBreadth; };
+    #endif
+    
+    
+    #if CREATE_ALL_DESVARS | LEFT_HAND_BREADTH
+    AnyDesVar LeftHandBreadth = {
+      Val = SEGMENTS_LENGTHS.Left.HandBreadth;
+      Min = 0.05;
+      Max = 0.5;
+    };
+    #endif
+    #if LEFT_HAND_BREADTH
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftHandBreadth = Main.ModelSetup.ParameterIdentification.LeftHandBreadth; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_HAND_BREADTH & LEFT_HAND_BREADTH & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure HandBreadthSymmetry = {
+      Val = .LeftHandBreadth.Val - .RightHandBreadth.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_HAND_BREADTH & LEFT_HAND_BREADTH & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& HandBreadthSymmetry = Main.ModelSetup.ParameterIdentification.HandBreadthSymmetry; };
+    #endif  
+    
+    
+    #if CREATE_ALL_DESVARS | RIGHT_TIBIAL_TORSION 
+    AnyDesVar RightTibialTorsionOffset = {
+      Val = HUMAN_MODEL_FOLDER.BodyModel.Right.Leg.Seg.Shank.AnkleJoint.TibialTorsionOffset;
+      Min = -pi/4;
+      Max = pi/4;
+    };
+    #endif
+    #if RIGHT_TIBIAL_TORSION
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightTibialTorsionOffset = Main.ModelSetup.ParameterIdentification.RightTibialTorsionOffset; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_TIBIAL_TORSION 
+    AnyDesVar LeftTibialTorsionOffset = {
+      Val = HUMAN_MODEL_FOLDER.BodyModel.Left.Leg.Seg.Shank.AnkleJoint.TibialTorsionOffset;
+      Min = -pi/4;
+      Max = pi/4;
+    };
+    #endif
+    #if LEFT_TIBIAL_TORSION
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftTibialTorsionOffset = Main.ModelSetup.ParameterIdentification.LeftTibialTorsionOffset; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | (RIGHT_TIBIAL_TORSION & LEFT_TIBIAL_TORSION & LEFT_RIGHT_SYMMETRY) 
+    AnyDesMeasure TibialTorsionSymmetry = {
+      Val = .LeftTibialTorsionOffset.Val + .RightTibialTorsionOffset.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_TIBIAL_TORSION & LEFT_TIBIAL_TORSION & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& TibialTorsionSymmetry = Main.ModelSetup.ParameterIdentification.TibialTorsionSymmetry; };
+    #endif      
+    
+    
+    #if CREATE_ALL_DESVARS | RIGHT_VARUS_VALGUS
+    AnyDesVar RightVarusValgusOffset = {
+      Val = HUMAN_MODEL_FOLDER.BodyModel.Right.Leg.Seg.Thigh.KneeJoint.VarusValgusRotation;
+      Min = -pi/4;
+      Max = pi/4;
+    };
+    #endif
+    #if RIGHT_VARUS_VALGUS
+    PARAMETER_OPT_STUDY = { AnyDesVar& RightVarusValgusOffset = Main.ModelSetup.ParameterIdentification.RightVarusValgusOffset; };
+    #endif
+    
+    #if CREATE_ALL_DESVARS | LEFT_VARUS_VALGUS
+    AnyDesVar LeftVarusValgusOffset = {
+      Val = HUMAN_MODEL_FOLDER.BodyModel.Left.Leg.Seg.Thigh.KneeJoint.VarusValgusRotation;
+      Min = -pi/4;
+      Max = pi/4;
+    };
+    #endif
+    #if LEFT_VARUS_VALGUS
+    PARAMETER_OPT_STUDY = { AnyDesVar& LeftVarusValgusOffset = Main.ModelSetup.ParameterIdentification.LeftVarusValgusOffset; };
+    #endif
+
+    #if CREATE_ALL_DESVARS | (RIGHT_VARUS_VALGUS & LEFT_VARUS_VALGUS & LEFT_RIGHT_SYMMETRY)
+    AnyDesMeasure VarusValgusSymmetry = {
+      Val = .RightVarusValgusOffset.Val + .LeftVarusValgusOffset.Val;
+      Type = EqualToZero;
+    };
+    #endif
+    #if RIGHT_VARUS_VALGUS & LEFT_VARUS_VALGUS & LEFT_RIGHT_SYMMETRY
+    PARAMETER_OPT_STUDY = { AnyDesMeasure& VarusValgusSymmetry = Main.ModelSetup.ParameterIdentification.VarusValgusSymmetry; };
+    #endif      
+        
+    
+ };
+  
+  
+  
+  
+  
+  
+  
+}; // End of InsertSegmentClass
+
+
+
+#class_template CreateDesVar (
+    NAME,
+    PARAMETER,
+    ENABLE=1, 
+    PARAMETER_OPT_STUDY = Main.Studies.ParameterIdentification
+    )
+{
+   Main.ModelSetup.ParameterIdentification = 
+   {
+     AnyDesVar NAME = {
+       Val = .....PARAMETER;
+       #var Min = 0.01;
+       #var Max = 1;
+     };
+   };
+   #if ENABLE
+   PARAMETER_OPT_STUDY = 
+   {
+      AnyDesVar& NAME = Main.ModelSetup.ParameterIdentification.NAME;
+   };
+   #endif
+};
+
+
+#endif