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

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

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

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

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();

Tags:

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

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

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

Those are only for GUI Scripting

POST REPLY