Using multiple plug-ins at the same time

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Ibraheem Al-Dhamari
Posts: 35
Joined: Thu Mar 16, 2017 2:44 am

Using multiple plug-ins at the same time

Post by Ibraheem Al-Dhamari » Fri Jan 22, 2021 1:46 am

Dear all,

how can I use more than one plug-in at the same time? I tried :

Code: Select all

        opensim-cmd  -L  myPlugin1 -L  myPlugin2  run-tool myAnalysis_Setup_A.xml
and

Code: Select all

        opensim-cmd  -L  myPlugin1  myPlugin2  run-tool myAnalysis_Setup_A.xml
but it seems it takes only the first argument i.e. myPlugin1. I got this message :

Code: Select all

Object::newInstanceOfType(): object type 'myPlugin2' is not a registered Object!
Object type myPlugin2 not recognized
and the output was only for the first plugin. Please let me know if I missed something. If this is not available in opensim, the work-around in my mind is to combine the two plugins in one plugin.

Best regards!

Ibraheem

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Using multiple plug-ins at the same time

Post by Ayman Habib » Fri Jan 22, 2021 10:34 am

Hello,

I believe the opensim-cmd does not handle multiple plugins, you can however load multiple plugins in your own code by explicitly calling the method

Code: Select all

LoadOpenSimLibrary
multiple times with the corresponding plugin names. If however you prefer to stay with the provided commands/utilities/tools then you'll need to combine the plugins. I'm curious about the use case to understand if this is something we should plan to address in the future, can you describe your scenario?

Thank you,
-Ayman

User avatar
Ibraheem Al-Dhamari
Posts: 35
Joined: Thu Mar 16, 2017 2:44 am

Re: Using multiple plug-ins at the same time

Post by Ibraheem Al-Dhamari » Sat Jan 23, 2021 12:15 pm

Dear Ayman,

Thanks for your quick answer, I think it would be nice to have support for multiple plug-ins. This is already supported in the GUI so I thought it is already supported in the command line tool as well.
I'm curious about the use case to understand if this is something we should plan to address in the future, can you describe your scenario?
Here are some scenarios:

- Running libraries from developed somewhere else. Combining these libraries code may take time and effort.
- Experimenting with new muscle and ligament plugins.
- It is easier to maintain and update when the plugin is less complicated, so it is good to be separated in a separate library.

Having this support for the opesim-cmd tool allows writing one python script that runs many experiments, getting results, and generating charts in an elegant way.

Best regards!

Ibraheem

POST REPLY