← Back to team overview

yade-users team mailing list archive

[Question #267838]: How to use function updateAttrs

 

New question #267838 on Yade:
https://answers.launchpad.net/yade/+question/267838

There are many updateAttrs function in different classes, According to my knowledge, this function is used to change attributes of classes with a dictionary. But what's the parameter that I should give?

For instance, I'd like to update  yade.O.bodies[10000].state.pos to [0,0,0], I write a code like that:
yade.O.bodies[10000].state.updateAttrs({yade.O.bodies[10000].state.pos:[0,0,0]})

and the result is:
TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type Vector3

How should I modify it?

Hope to get some help,

thanks.


-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.


Follow ups