Export ScaleTool setting xml

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
P Wesberg
Posts: 10
Joined: Fri Jan 11, 2019 5:55 am

Export ScaleTool setting xml

Post by P Wesberg » Tue Sep 08, 2020 5:32 am

Hello,

Using python API for scaling, I
1. generate an scale tool instance by loading an generic scale_settings.xml
2. than set some specific values (i.e. ScaleTool.getModelScaler().setOutputModelFileName('output_model_name')
3. run the scale tool.

For some reason (i.e. documentation) I'ld like to export the manipulated scale_settings.xml from 2. step.

The scaletool function I've found so far print the scale factors to a xml file,

Code: Select all

ScaleTool.print('setup_scale.xml')
ScaleTool.getModelScaler().setOutputScaleFileName()
ScaleTool.setPrintResultFiles()
... but they do not print the scale settings to xml. Is there any method you recommend?

Tags:

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: Export ScaleTool setting xml

Post by Carmichael Ong » Sat Sep 12, 2020 6:03 pm

I think this is a specific issue with Python, because it has its own "print" function. To get around this, we rename the function "printToXML()". I'd try replacing your first line with "printToXML". The next two lines are functions that take one input argument. Our doxygen pages on those can be helpful to know what inputs are needed:
https://simtk.org/api_docs/opensim/api_ ... caler.html
https://simtk.org/api_docs/opensim/api_ ... eTool.html

POST REPLY