Rhinoscriptsyntax ViewCameraUp - Rhino 8

Another thing that works in R7 but not R8. Why is R8 so limited and full of bugs? How long it has been out of beta phase? Why simple things like this still do not work? Why do they start R9 when R8 is in such a bad state? Why do I get almost 0 support for R8 bugs?

I’ve tried searching the forum but obviously this is new and not mentioned anywhere yet. Fine. I copied example from Rhino - RhinoScriptSyntax and it does not work. Why, why and why??? What am I suppose to do when going back to R7 is not an option???

The example seems to contain an error. Try this:

import rhinoscriptsyntax as rs

view = rs.CurrentView()

upVector = rs.ViewCameraUp(view)

print(upVector)

For Grasshopper, I believe you need to tell Grasshopper to use the Rhino document:

ViewCameraUp_python.gh (4.4 KB)

Hey Martin,

Thanks for the solution, it works. Yeah it was Rhino ActiveDoc that I was missing.

Yet I am still complaining because:

  • My version works in R7, so all I see from R8 changes is trouble without any benefit, and more importantly, not documented anywhere.
  • Their example did not reflect this. Forget about variable name typo, but it does not state the requirement of ActiveDoc in this case.
  • The error message is far from helpful. How am I suppose to figure it out?

God I miss the good old days of R7. Onto the next R8 bug!

I don’t know. I’ve seen an error message that tells you to use ActiveDoc but also don’t see it in this case.

@user1986 Thanks for complaining :smiley:

rhinoscriptsyntax can be used both in the main Rhino script editor and GH script editors. But GH script editor sets the scriptcontext.doc to the instance of Grasshopper doc. This behaviour exists in Rhino 7 as well AFAIK. The problem seems to be related to the wrapper GetViewList missing the (Boolean, Boolean) overload. I will fix that.

RH-89611 Proxy GetViewList is missing bool,bool overload