I want to obtain the last element from the MFVec3f force vector (z-direction) by using getValueByIndex. I get this error message:
[code]MFVec3f Traceback (most recent call last):
File “BoxDrag.py”, line 12, in update
forces = routes_in[0].getValueByIndex(2)
AttributeError: MFVec3f instance has no attribute ‘getValueByIndex'[/code]
This is the code snippet:
[code]def update(self, event):
routes_in = self.getRoutesIn()
print(routes_in[0].getTypeName())
forces = routes_in[0].getValueByIndex(2)
print(forces)[/code]
I’m confused, since getValue() is working just fine. getValueByIndex() is listed under MFVec3f functions.
Probably it boils down to me not really knowing how to use the documentation correctly.