Hi,
You have the Material in a loop, so the columns would be repeatedly be painted
If the Material collector only retrieves one material, then use .First and only paint the columns once.
If after the run (paint by API-Fail, Paint with UI-Ok, paint with API-Ok)
Run it again but now pick another material, does that paint ok now. (maybe some initialize of the material of the geometry of the column...)