Page 1 of 1

Adding New Class and Plugin to OpenSim 4.4

Posted: Mon Oct 31, 2022 6:07 am
by nima95
Dear all,

I want to work on this model:
https://simtk.org/projects/kuo-head-neck

When I want to open the .osim file in OpenSim 4.4, I face the following error:
Object::newInstanceOfType(): object type '{DynamicLigamentForce}' is not a registered Object! It will be ignored.

In the model folder, there is a plugin (osimDynamicLigamentPlugin.dll).
I created a new folder where my OpenSim is installed (C:\OpenSim 4.4), and its name is plugins. I copied the .dll file into it.
When I open my OpenSim in Tools->User Plugins, I can see that my plugin exists. When I click on it, I face the following error:
Error trying to load library osimDynamicLigamentPlugin. Library not loaded.

Can someone help me with what I should do to register DynamicLigamentForce to my OpenSim?
(Just for your information, I am using Windows 10, 64 bit)

Bests,
Nima

Re: Adding New Class and Plugin to OpenSim 4.4

Posted: Mon Oct 31, 2022 9:46 am
by aymanh
Hello,

Creating a plugin that loads in the GUI requires that you build it against the same version of the opensim libraries that the GUI is built against, and also that you use the same compiler (in this case VS 2019) and the same settings (Release not Debug). Can you confirm that all these have been followed? There are other things that could be problematic but first let's confirm the above version/compiler questions.

Best regards,
-Ayman

Re: Adding New Class and Plugin to OpenSim 4.4

Posted: Wed Nov 02, 2022 12:45 am
by nima95
Thank you so much,

I have talked with Prof. Musa Audu and Adam Kewley, and based on their suggestions, I opened the .osim file with OpenSim 3.3 with no problem, and it was straightforward.
As I am interested in opening this model in OpenSim 4.4, I will go through creating the plugin that is compatible with OpenSim 4.4

I will give updates here with possible errors.

Bests,
Nima