Hello Fu, whenever you get an error, please input it to the question. Also try to understand it. I guess, that there another problem than body_id:
1) ...[body_id=b] is not valid Python syntax 2) O.engines is list, so O.engines.Recorder makes no sense.. cheers Jan 2015-06-23 6:11 GMT+02:00 Fu zuoguang <[email protected]> : > Question #268448 on Yade changed: > https://answers.launchpad.net/yade/+question/268448 > > Description changed to: > Dear Prof. Chareyre and all users, > > In a special state, the results of resultant forces and moments > of all bodies in simulation need to be output as well as those of > all contacts. But now I failed to do this with the classes of > 'ForceRecorder' and 'TorqueRecorder' in the following style: > > for b in O.bodies: > O.engines.Recorder.ForceRecorder[body_id = b].totalForce > O.engines.Recorder.TorqueRecorder[body_id = b].totalTorque > > My questions are that > > (1) Do I get the right classes for my purpose ? > (2) If yes, how to access the classes of 'ForceRecorder' and > 'TorqueRecorder' > from 'O.engines' (the above sentences exsit errors) with the given body_id > ? > > Best regards > Zuoguang Fu > > -- > You received this question notification because you are a member of > yade-users, which is an answer contact for Yade. > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-users > Post to : [email protected] > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp >
_______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

