I attempt to assign white as a base color
and after refresh Infraworks returns:
It failed to parse the color code and the buildings are some default red color that i don't want
this did not work:
// Failed to create mapping. Details: 'Failed to parse expression.'.
// BUILDINGS.BASE_COLOR = #FFFFFF;
even with 6 digits
I have seen the red color applied to buildings when I had mapped a data source property to the Rule Style field but didn't create Style Rules to differentiate between individual property values. I just played around with some buildings in my model as was able to make changes to building color most effectively through the Properties Palette. Make sure to click Update in the Properties Palette.
Additionally, in your script, I notice that you start BUILDINGS.BASE.COLOR with the // double slash, which normally is the tag for a one-line comment in JavaScript. Try removing the // from the line and use a 6 digit color code.