About building a model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
li haoran
Posts: 8
Joined: Mon Apr 16, 2018 12:59 am

About building a model

Post by li haoran » Thu Jul 05, 2018 6:38 am

In the beginning, I opened a model file in visual studio2017, then created a model, how to export the two model files to an .osim file.As shown below:
Model osimModel;
osimModel.setName("osimModel");
osimModel.setUseVisualizer(true);

OpenSim::Model ankleModel = Model("../model/model/Mysubject04.osim");
ankleModel.setUseVisualizer(true);
ankleModel.setName("osimModel");

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: About building a model

Post by jimmy d » Thu Jul 05, 2018 10:08 am

Model inherits from Object(), which has a print() method. See the API documentation.

If you are using Visual Studio, you are able to view an object's methods in the IDE. Please read the Visual Studio documentation

User avatar
li haoran
Posts: 8
Joined: Mon Apr 16, 2018 12:59 am

Re: About building a model

Post by li haoran » Thu Jul 05, 2018 11:46 pm

Thank youfor your reply! But you misunderstood what I meant. Now, there are two different .osim files. As mentioned above, one model file name is osimModel and the other model file name is ankleModel. I want to merge them into a model file in visual studiio 2017, but I don't know how to do it.

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: About building a model

Post by jimmy d » Fri Jul 06, 2018 7:49 am

I want to merge them into a model
You can't merge two models automatically. You will have to write a script that copies components from one model to the other, or you will have to edit the osim files directly- copying xml blocks from one file to another.

POST REPLY