"Tony" wrote in message <email@example.com>... > Hi Michele, > > I think I see what you want to do. If you have two or more subsystems that rely on the same parameter, you can define that parameter in the model workspace. This applies not only to geometry but also inertia, color, force constants, joint state targets, etc. In other words, you can use this approach for almost any situation where two different blocks rely on a common parameter. > > To use the model workspace: > > 1. Click Tools -> Model Explorer > 2. In the Model Hierarchy pane, click the name of your model, and then click "Model Workspace" > 4. On the right side of Model Explorer, look for bold letters that say "Model Workspace". > 5. In the Data Source drop-down menu, select "MATLAB Code". > 6. A big white rectangle shows up. Use it to define your common parameters, and click "Reinitialize from Source" to apply the changes to the model. > > Let me know if that works! > - Tony > > "pietro " <firstname.lastname@example.org> wrote in message <email@example.com>... > > Hi all, > > > > I'm creating a mechanism with simmechanics second generation libraries, that it is composed of several compounds body and the dimesion of each body is related to the length of one body (i.e. body_length). I created a body and I parameterized it through the creation of a subsystem and a mask. Now I have to create the second body, but I don't know to make the length of the first body as global so the second body can see it. > > Hopefully to have explained correctly my question, if not, don't hesitate to ask me something. > > > > Best regards > > > > Michele
thanks for your reply. It works but: 1- the dimension of each element of a body is connected to the parameters with some formulas, many of them are not straightforward ones. To reuse all bodies in other models, I need to inizialize the body length in the subsystem and not in the model workspace. How could I do that? 2- I start the simulation in a objective function. How can I change the paramater though it?