Added fromAttribute() method to the Vector* classes

Fixes #5729