See if this does what you want. The numbers I have for lineweights are different than the ones you list, so I couldn't test it, but it should work.
Code:
(vl-load-com)
(defun LineweightByColor (Doc LwClrList / )
(vlax-for lo (vla-get-Layouts Doc)
(vlax-for obj (vla-get-Block lo)
(if (setq tempList (assoc (vla-get-Color obj) LwClrList))
(vla-put-Lineweight obj (cdr tempList))
)
)
)
)
(LineweightByColor
(vla-get-ActiveDocument (vlax-get-Acad-Object))
(list
'(1 . 16)
'(2 . 7)
'(3 . 14)
'(4 . 24)
'(5 . 2)
'(6 . 31)
'(7 . 6)
'(8 . 2)
)
)