I´ve been trying to use the Rhino.Display.ViewCapture.CaptureToBitmap() from the RhinoCommon API but it is returning None:
rhino_file_viewtable = rhino_file_instance.Views
viewportinfo = rhino_file_viewtable.FindName(“Top”)
rhinoviewport = Rhino.Display.RhinoViewport(viewportinfo)
viewcapturesettings = Rhino.Display.ViewCaptureSettings(rhinoviewport, 400, dpi)
bmp = Rhino.Display.ViewCapture.CaptureToBitmap(viewcapturesettings)
print (bmp) # RETURNS None
I suspect it is due to the rhinoviewport not being a RhinoView, which is returned by the GetPageViews () when using scriptcontext.
Any ideias on how to use the GetPageViews in RhinoCommon API (returning a RhinoView?) or alternativelly, getting a RhinoView from an existing file?