We are in the process of updating this documentation for OpenSim 4.0. Are you looking for OpenSim 3.3 documentation?



OpenSim contains a command line executable that can run all of the OpenSim Tools. This executable takes as input the same setup (or settings) file loaded into or saved from the OpenSim GUI application. For example, to perform Inverse Kinematics from the command line (the Command Prompt in Windows, or the Terminal on macOS), one can execute the following command:

The same command can be used to run CMC or any other tool (the specific OpenSim Tool to run is determined based on the provided setup file). The command line executable is located in <OpenSim_Install_Dir>/bin (on Windows, this directory also contains deprecated executables named "ik", "id", "cmc", etc.).

The command line executable can do more than run OpenSim Tools. You can generate template XML files for tools or modeling components (opensim-cmd print-xml) and update an XML file to the latest version (opensim-cmd update-file). Lastly, the command opensim-cmd info can be a very handy resource to obtain information about Tools and Components, including the XML tags needed in the model and/or setup file. This is the same information listed in the "XML Browser" panel under the Help menu in the OpenSim GUI. Executing opensim-cmd info without any other arguments lists all the registered classes (components, analyses, utilities and tools) available in OpenSim. For more information about a particular object, such as adding a point constraint to the model, executing

yields:

This list describes the properties used to define a point constraint in OpenSim.

Just like the GUI, the command line executable also allows loading OpenSim plugins (via the --library argument). 

Use opensim-cmd --help for more information and examples on how to use the command line executable.

Previous: Probes