- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » objects in loop in Dymola
objects in loop in Dymola
objects in loop in Dymola
Hi everyone,
I'm using dymola and I would like to use an object (a bodybox) in a loop because I want to be able to change the coordinates of several bodyboxes (linked with a ball joint) automatically.
For the moment, I'm writting this:
for k in 1:n+1 loop
parameter Modelica.SIunits.Length X[k] = R * cos(k * Theta)
parameter Modelica.SIunits.Length Y[k] = R * sin(k * Theta) ;
end for;
I suppose that I need to use at some point the names of my bodyboxes in the loop --> bodybox_k , but no matter how I try, I donnot manage to succeed.
Thanks for your help,
Cheers,
Charlie
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » objects in loop in Dymola