Page 1 of 1

ScaleTool API execution and outputs

Posted: Thu Feb 02, 2017 12:20 am
by julian_atkinson
Hi all

I have been struggling with the scaleTool API for some time now. I am writing this post to both help others that have struggled with the scaleTool API, and to ask a few more questions. I have managed to now get it running with the help of the following forums:

Help with execution -
viewtopicPhpbb.php?f=91&t=4689&p=11354&start=0&view=

Help with the setup -
viewtopicPhpbb.php?f=91&t=6964&p=18111&start=0&view=

Setup, execution and specifically for problems with the time range -
viewtopicPhpbb.php?f=91&t=3977


My next question is about the output paths:

When executing the following code:

sTool.getModelScaler().processModel(states,model,subject_path,mass);
sTool.getMarkerPlacer().processModel(states,model,subject_path);

It does not allow you to dictate where your scaled model output should be. It is automatically placed in subject_path. Is there a way of changing this?

(Extra key words for those that search the forums: matlab, scale, TimeArray, TimeRange, script(script=='/'))

Regards,
Julian

Re: ScaleTool API execution and outputs

Posted: Thu Feb 02, 2017 5:15 pm
by tkuchida
It does not allow you to dictate where your scaled model output should be. It is automatically placed in subject_path. Is there a way of changing this?
You should be able to do this by providing the path plus filename in the _outputModelFileName property, using the ModelScaler::setOutputModelFileName() method (https://simtk.org/api_docs/opensim/api_ ... caler.html).