Cannot find 'getResourcesDir' and 'modeling' modules when using

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Cai Birch
Posts: 30
Joined: Tue Jan 02, 2018 7:40 am

Cannot find 'getResourcesDir' and 'modeling' modules when using

Post by Cai Birch » Thu Dec 13, 2018 7:56 am

I'm trying to run the 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);


User avatar
Christopher Dembia
Posts: 331
Joined: Fri Oct 12, 2012 4:09 pm

Re: Cannot find 'getResourcesDir' and 'modeling' modules when using

Post by Christopher Dembia » Thu Dec 13, 2018 8:23 am

Those are only for GUI Scripting