Hello,
I am working with the AnyMoCap BVH_Xsens example in AMMR and I am running into a persistent parsing issue when trying to add any new AnyScript code.
Software:
AnyBody Modeling System 8.1.x (Faculty Research License)
Model:
AMMR → Application → MocapExamples → BVH_Xsens (AnyMoCap framework)
Goal:
I imported my own Xsens BVH file and can successfully run the full example pipeline (MarkerTracking and InverseDynamicStudy). However, I cannot add any additional AnyScript code via a new .any file, even a very simple test, without getting syntax/parser errors.
What works:
- I navigated to:
C:\AnyBody\AMMR\Application\MocapExamples\BVH_Xsens - I copied my BVH file into:
BVH_Xsens\BVH-files
The file is copied successfully. - In the Subjects folder, I copied an existing subject/trial folder, renamed it to my subject identifier (for example: S_H\S_H_Trial01), and loaded Main.any from that folder.
- Initially, many files were read-only due to Windows permissions. I removed the read-only attribute at the AMMR folder level (right click → Properties → uncheck Read-only, apply to subfolders and files).
- I edited only SubjectSpecificData.any (for example, body mass and body height). After this change, the model loads and RunAnalysis works correctly.
So the baseline AnyMoCap example works, and editing the provided hook files works.
What does NOT work:
As soon as I try to add any new AnyScript code, the model fails during parsing.
For example, I created a new file called TestFolder.any in the same directory as Main.any and added the following minimal content:
Main.TestFolder =
{
AnyIntVar TestValue = 1;
};
Then I added this line to Main.any (after the AnyMoCap model include):
#include "TestFolder.any"
This immediately causes parsing errors when loading the model.
Typical errors I see:
- ERROR(SCR.PRS11): '{' unexpected
- ERROR(SCR.PRS11): '.' unexpected
- ERROR(SCR.PRS12): 'AnyFolder' when 'Main' was expected
These errors occur before any analysis runs.
Observations:
- The model works as long as I only edit existing files pulled in via #path (SubjectSpecificData.any, TrialSpecificData.any).
- Any attempt to include a new .any file causes parsing errors, even with very simple content.
- I have tried different file names, moving the include line, and simplifying the code further, but the result is always the same.
- This makes me suspect there are specific constraints on how the BVH_Xsens / AnyMoCap example is intended to be extended.
My question:
What is the correct and supported way to add custom AnyScript code to the AnyMoCap BVH_Xsens example?
Is it expected that users should only modify SubjectSpecificData.any and TrialSpecificData.any?
If it is possible to include new files, what scope or structure should the included file have?
I am not trying to apply external forces yet; I am only trying to understand why any new code added via a separate .any file fails to parse.
Thank you very much for your help.

