Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update code syntax per forum post

...

ActionClass InformationGetting a Handle to a SetReference an Object by indexGet object from a nameAlternative 'long path'
Body Set
New window link
BodyOpenSim::BodySet
Linkhttps://simtk.org/api_docs/opensim/api_docs/classOpenSim_1_1BodySet.html
bodySet= myModel.getBodySet()rightFemur = bodySet().get(1)rightFemur = bodySet().get("femur_r")rightFemur =myModel.getBodySet().get("femur_r")
Joint Set
New window link
BodyOpenSim::JointSet
Linkhttps://simtk.org/api_docs/opensim/api_docs/classOpenSim_1_1JointSet.html
jointSet = myModel.getJointSet()rightHip = jointSet ().get(7)rightHip = jointSet().get("hip_r")rightHip = myModel.getJointSet().get("hip_r")
Coordinate Set
New window link
BodyOpenSim::CoordinateSet
Linkhttps://simtk.org/api_docs/opensim/api_docs/classOpenSim_1_1CoordinateSet.html
cordSet= myModel.getCoordinateSet()hip_coord = cordSet().get(4)hip_coord = cordSet().get("hip_flexion_r")hip_coord = cordSet().get("hip_flexion_r")
Muscle Set
New window link
BodyMuscles
Linkhttps://simtk.org/api_docs/opensim/api_docs/classOpenSim_1_1Muscle.html
muscleSet= myModel.getMuscles()recFemR = muscleSet().get(3)rec_fem_r = recFemRt().get("'recFem_r")rec_fem_r= myModel.getMuscles().get("'recFem_r")
Path Point of a Muscle
New window link
BodyOpenSim; PathPoint
Linkhttps://simtk.org/api_docs/opensim/api_docs/classOpenSim_1_1PathPoint.html
pathPoints = myModel.getMuscles().get("'recFem_r").getGeometryPath().getPathPointSet()recFemPathPoint1 = pathPoints.get(0)recFemPathPoint1 = pathPoints.get("rect_fem_r-P1")recFemPathPoint1 = myModel.getMuscles().get("'recFem_r").getGeometryPath().getPathPointSet()

...