Page 1 of 1

Cannot find 'getResourcesDir' and 'modeling' modules when using runScaling.py

Posted: Thu Dec 13, 2018 7:56 am
by 00ocai
I'm trying to run the runScaling.py code in my script but both 'getResourcesDir()' and 'modeling.' are undefined despite importing os.path and opensim. Is there something else I'm missing or does anyone know where these modules are located so that I can import them?

Code: Select all

# Written by James Dunne, Stanford University
import os.path
  
# Define paths
modelFolder		=	os.path.join(getResourcesDir(),"Models", "Gait2354_Simbody");
scaleSetupPath	=	os.path.join(modelFolder, "subject01_Setup_Scale.xml");

## Run the Scale Tool with all the current settings from the setup file
scaleTool = modeling.ScaleTool(scaleSetupPath)
scaleTool.run();

Re: Cannot find 'getResourcesDir' and 'modeling' modules when using runScaling.py

Posted: Thu Dec 13, 2018 8:23 am
by chrisdembia
Those are only for GUI Scripting