Page 1 of 1

Using multiple plug-ins at the same time

Posted: Fri Jan 22, 2021 1:46 am
by idhamari
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

Re: Using multiple plug-ins at the same time

Posted: Fri Jan 22, 2021 10:34 am
by aymanh
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

Re: Using multiple plug-ins at the same time

Posted: Sat Jan 23, 2021 12:15 pm
by idhamari
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