Go Back   Forums > Professional Forum > Gallery of user models and videos


Thread Tools Display Modes
Old 02-16-2011, 02:05 PM
koningbhw koningbhw is offline
Join Date: Feb 2010
Posts: 32
Default Implementing project folder structure in AMS project


I'm posting some tips on how to create a project, where (C3D-) files and results are stored in a project folder structure. Using this, it is (or seems) no longer necessary to copy-paste files to and from the location where the model is located. By setting the experiment folder in the modelsetup once and other trial specific details (Subject,trialdata,trialnumber) in the TrialSpecificData, it is possible to perform the different analyses from one single location, but meanwhile keep a very structured project.

I've added these additions to my own model which was based on the AMMRV1.3 GaitLowerExtremityProject. As I am not adding a zip-file with my model (not completely finished yet) which is slightly different from the repository model, it could be that I missed to post some small details. Secondly, I am not working with the inverse dynamic model (yet), so I haven't stated changes needed for that (but it seems pretty straightforward to me). My apologies for any inconvenience, but it works (almost perfectly) for me and would like share it to enable improvements for this adaptations.

There is only one slight problem concerning classoperation macro's, as it seems that these text based macro's ignore backslashes (which is vital for the folder structure). Therefore optimized parameters are still stored in the AMS folder. -> solved by removing the "strformat()" command in the macro (see

Kind regards,

Bart Koning

Explanation of folder structure:

- Experiment root folder (Main.ModelSetup.ExperimentProperties.ExperimentFo lder)
__- Subject (Main.TrialSpecificData.Subject)
____- Trialdate (Main.TrialSpecificData.TrialDate)
______- Vicon (location original C3D files: Main.TrialSpecificData.InputFolder)
________- C3Dfile (Main.ModelSetup.C3DFileData.FileName)
______- AnyBody (folder for anybody results: Main.TrialSpecificData.OutputFolder)
________- Results (Main.Studies.MotionOptimization.ModelOutputs.Join tKinematics.JointKinematics.FileName)

Additions in AMS (in order of addition)
- ModelSetup.any (Define root folder of the project)

AnyFolder ExperimentProperties = {
// Location of markerdata and other subject specific properties
AnyString ExperimentFolder = "D:\Schaatsplankmeting\ProjectFolder\";

- TrialSpecificData.any (Define location and name of specific trail):

// Subject
AnyString Subject = "Subj";
AnyString TrialDate = "20100712";
AnyString TrialNumber = "03";
AnyString ExportName = Subject + TrialDate + TrialNumber;

// In- and output folders
AnyString InputFolder = Main.ExperimentProperties.ExperimentFolder + Subject + "\" + TrialDate + "\Vicon\";
AnyString OutputFolder = Main.ExperimentProperties.ExperimentFolder + Subject + "\" + TrialDate + "\Anybody\";

//Starting and end element for the analysis of part a
AnyString TrialPart = "a"; // I use this when I cut very long trials into seperate parts

// C3D file name
AnyString C3Daddition = "_labeling_Final";
AnyString NameOfFile = Subject + "_" + TrialDate + TrialNumber + C3Daddition;

- ModelSetup.any (direct AMS to correct c3d-file)
AnyInputC3D C3DFileData = {
FileName = Main.TrialSpecificData.InputFolder + Main.TrialSpecificData.NameOfFile+ ".c3d";
.. etc

- Output.any (create output)
AnyString OutputFolder = Main.TrialSpecificData.OutputFolder;
AnyString TrialName = Main.TrialSpecificData.Subject + "_" + Main.TrialSpecificData.TrialDate + Main.TrialSpecificData.TrialNumber;
AnyString TrialPart = Main.TrialSpecificData.TrialPart;

AnyOutputFile JointKinematics = {
FileName = ..OutputFolder + ..TrialName + ..TrialPart +"-joint_kinematics.AnyOut"; // I choose to use the extension AnyOut
SepSign = ", ";
};//End JointKinematics

- MotionAndParamOptimization.Main.any & InitialPos.Main.any (stores widget values in the project output folder)
Main.Project ={
Files = {
SetValueFile = Main.TrialSpecificData.OutputFolder + Main.TrialSpecificData.NameOfFile+"-MarkerPositionWidgetValues.txt";

Last edited by koningbhw; 03-07-2011 at 03:41 PM. Reason: Problem withusing pathname in macro is solved.
Reply With Quote

folder structure, project

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:37 AM.