I am not sure if you still have this question but I was just looking into it and noticed that the error only occurs the 1st 2 iterations and that the error probe gives this information
"Error -2146828283 occurred at Exception occured in cw3dgrph, Can't set a surface plot style for a line plot.. Help Path is cw3dgrph.chm and context 1531 in Test_3D[1].vi"
So I believe the issue is that until the third iteration the graphs only has enough points for a line, not a full surface. Therefore it generates this error stating that you can not set a line to be a surface. Once you have 3 points you then have a surface so the error goes away.