Script for changing printwidth, print color and linetype to "by layer" for all obejcts inside blocks

Hi,

I have a lot of blocks for different 2D furniture that has been gathered from different files. When I want to print a PDF of my plans all the print width settings I applied to the layers are overruled by the individual settings for objects inside the different blocks. I’m looking for a script that allow you to change Print Width properties for all objects inside all blocks to be “by layer”. This way you wouldn’t have to enter every single block and change it manually.

Does anyone have a solution to this?