Excel programing

Hi Soren,

We’re investigating the AnyBody Programming. On an Excel sheet we list
all muscles and we select on the Excel sheet the ones that we want to
show on AnyBody model. We want to know the way to say AnyBody, on
Muscle.any file, if the muscle is selected show it on the AnyBody
model, if it isn’t selected don’t show the muscle on AnyBody model.

I apologize for all questions, we are a big research group.
Best regards.

Hi Raul

If you look in arm3d/muscle.any you can see that all the muscles are
displayed in the same way.

For example

AnyShortestPathMuscle deltoideus_scapular_part_1 = {
AnyMuscleModel &MusMdl = …MusPar.deltoideus_scapular_part_1;
AnyRefNode &Org = …Seg.Scapula.O_deltoideus_scapular_part_1;
AnyRefNode &Via
= .ArtificialRake.DeltoidMuscleConnector.DeltoidVia1;
AnyRefNode &Ins = …Seg.Humerus.I_deltoideus_scapular_part_1;
AnyDrawMuscle DrwMus = {
#include “…/drawSettings/MusDrawSettings.any” };
SPLine.StringMesh = 30;
AnySurfSphere &Surf =.art_tub_minus_tub_majusRef;
SPLine.InitWrapPosVectors = {
{0,0*…Sign,0.1}, {…Sign*0.1,0.0,0.0}
};

The line AnyDrawMuscle … is the line which controls the drawing of
the muscle. As you can see there is an include statement in the
folder and all the muscles uses this include statement.

If you open the include file it says:

RGB = Main.DrawSettings.Muscle.RGB;
DrawOnOff = Main.DrawSettings.Muscle.DrawOnOff;
Bulging = Main.DrawSettings.Muscle.Bulging;
ColorScale = Main.DrawSettings.Muscle.ColorScale;
RGBColorScale = Main.DrawSettings.Muscle.RGBColorScale;
MaxStress = Main.DrawSettings.Muscle.MaxStress;
Transparency = Main.DrawSettings.Muscle.Transparency;

The setting DrawOnOff controls if the muslce should be displayed or
not, as you can see the muscles all refers to the same setting in
the Main.DrasSettinsg folder. What you need to do is to make a
separate settings for each of the muscles.

I suggest the following solution

1 Make a new include file which has a line for each of the muscles.
AnyFolder MusclesOnOff={
AnyInt Deltoid1 = 0;
AnyInt Deltoid2 = 1;

AnyInt Pron_quadr_2=1;
};

2 in the include file #include “…/drawSettings/MusDrawSettings.any”
remove the line

DrawOnOff = Main.DrawSettings.Muscle.DrawOnOff;

3 for each of the muscles in the muscle.any file make a reference to
the DrawOnOff setting for the particular muscle.

AnyShortestPathMuscle deltoideus_scapular_part_1 = {
AnyMuscleModel &MusMdl = …MusPar.deltoideus_scapular_part_1;
AnyRefNode &Org = …Seg.Scapula.O_deltoideus_scapular_part_1;
AnyRefNode &Via
= .ArtificialRake.DeltoidMuscleConnector.DeltoidVia1;
AnyRefNode &Ins = …Seg.Humerus.I_deltoideus_scapular_part_1;
AnyDrawMuscle DrwMus = {
DrawOnOff =
Main…??.MusclesOnOff.deltoideus_scapular_part_1.DrawOnOff;
#include “…/drawSettings/MusDrawSettings.any” };
SPLine.StringMesh = 30;
AnySurfSphere &Surf =.art_tub_minus_tub_majusRef;
SPLine.InitWrapPosVectors = {
{0,0*…Sign,0.1}, {…Sign*0.1,0.0,0.0}
};

This solution has one file with one line for each of the muscles,
with an On Off setting. The file could be automatic generated from
Excel using its build visual basic script.

I hope this kind of solution is what you had in mind.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, Raúl Borraz Lamiel
<raulborrazlamiel@…> wrote:
>
> Hi Soren,
>
> We’re investigating the AnyBody Programming. On an Excel sheet we
list
> all muscles and we select on the Excel sheet the ones that we want
to
> show on AnyBody model. We want to know the way to say AnyBody, on
> Muscle.any file, if the muscle is selected show it on the AnyBody
> model, if it isn’t selected don’t show the muscle on AnyBody
model.
>
> I apologize for all questions, we are a big research group.
> Best regards.
>