Capturing NamedView without affecting UI

Hi all,

What’s the best way to capture (any) named view to a bitmap without relying on or affecting the current state of the UI? I can use the (deprecated) NamedViews.Restore() method, but then how do I switch the active view back to its original state?

The solution can’t leave a footprint in the doc :slight_smile:

Thanks!

Jon

Hi @Jon,

Not all of the NamedViewTable.Restore methods are deprecated.

https://developer.rhino3d.com/api/RhinoCommon/html/Overload_Rhino_DocObjects_Tables_NamedViewTable_Restore.htm

Try this:

1.) In the view you want to capture, save a temporary named view
2.) Restore your named view
3.) Capture the view
4.) Restore your temporary named view
5.) Delete your temporary named view

– Dale

Ah gotcha. That’ll work, thanks Dale!