WELCOME TO THE NEW PLATFORM FOR THE OPENSIM DOCUMENTATION

Remember to update your bookmarks with our new URL.
If you find missing content or broken links, let us know: opensim@stanford.edu


Using Plugins

Plugins allow you to extend the functionality of OpenSim with new analyses and model components.  A plugin comes in the form of a dynamically loaded library (.dll on Windows platform, .dylib on MAC, .so on Linux). It is straightforward to use a plugin that you have written or has been shared with you. Some existing, user-contributed plugins are available on the Simtk OpenSim Utilities page. To load a plugin use the following steps:

 Graphical User Interface

  1. Make sure the plugin has been built and tested on your platform. If you're unsure of your platform, go to Help>About OpenSim>Details. The plugin must have been created using the same version of OpenSim (e.g. 4.0) and build system (e.g. Visual Studio 2017). Plugin distributors should supply this information to users. The remaining steps appply to Windows only, for Mac please go to step 7 directly.
  2. Close OpenSim.
  3. Place the plugin under the plugins folder within your OpenSim installation folder (if you installed this in the default location on Windows, this will be C:\OpenSim <version number>\plugins). 
  4. Launch OpenSim. You should then see the plugin as a menu option under the User Plugins menu.
  5. From the User Plugins menu, click the name of the plugin to load it into OpenSim. You will be given the option to always preload the plugin each time OpenSim is launched. It is advised that you not do this until the plugin has been tested.
  6. To remove the plugin from the menu or disable the loading of it by the GUI, remove the plugin file from the plugins folder.
  7. On both Windows and Mac systems you can install the plugin into the GUI while it is up by typing the following command in the scripting shell
    • >> org.opensim.modeling.Model.LoadOpenSimLibrary("FullPathToLibrary")
      If you follow this route, the library/plugin will be loaded.  You'll have to type the command everytime you launch the application, however.

Matlab

  1. Make sure the plugin has been built and tested on your platform. If you're unsure of your platform, go to Help>About OpenSim>Details. The plugin must have been created using the same version of OpenSim (e.g. 4.0) and build system (e.g. Visual Studio 2017). Plugin distributors should supply this information to users.
  2. Add the directory that contains the plugin to the "librarypath" in Matlab (e.g. the default OpenSim plugins folder). In the Matlab command window type 'edit librarypath.txt'. Then add the appropriate directory.
  3. Execute opensimCommon.LoadOpenSimLibrary("<full-path-to-plugin>") in Matlab to use the plugin; make sure to leave off the file extension (e.g., .dll) for the library. Alternatively, you can use opensimCommon.LoadOpenSimLibraryExact("<full-path-to-plugin>") and leave in the file extension.

Command Line

The OpenSim command-line interface opensim-cmd takes an argument of the form “-L libraryName”. Thus, to use a plugin from the command line:

  1. Make sure the plugin has been built and tested on your platform. If you're unsure of your platform, go to Help>About OpenSim>Details. The plugin must have been created using the same version of OpenSim (e.g. 4.0) and build system (e.g. Visual Studio 2017). Plugin distributors should supply this information to users.
  2. Add the argument “-L <full-path-to-plugin>” to the command (leave in the file extension). See the help documentation for opensim-cmd (opensim-cmd --help) for examples. 

Developing Plugins

You can learn more about developing your own plugins from the following resources:

 

 

3

OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.