Help: Compiling rs.ViewDisplayMode(view=strView, mode=strMode) error when Compiled

Hi guys,
I can not get this to work. I am working on Holomark3 and the compiled script “crashes” each time (just stops running and returns so I can continue working in Rhino), and now I have narrowed it down to be related to rs.ViewDisplayMode() but since I don’t get any error message, and since it works flawlessly in the script. AND now I am lost since it used to work like when I compiled the Holomark2 V6 version…

So I guess a change has been made to RhinoCommon.dll or something, so can I workaround rs.ViewDisplayMode() in RhinoCommon? (I tried but failed)

Darn, it’s deeper than that… now rs.LayerVisible() fails too. So something isn’t right somewhere else since I made a supersmall script that just changes display mode to shaded, and that when compiled works just fine.