Today I was running into a problem when I wanted to save and restore viewport settings.
I can get a ViewportInfo object with all the settings from a RhinoViewport by using the constructor that takes a RhinoViewport object.
But, if my viewport has changed, I don’t see any way to restore the viewport using the previously saved ViewportInfo.
I ended up doing this in C++ where I can save ON_3dmView objects (viewport.View()) and restore the settings (viewport.SetView(saved_view)). There it works perfectly.
Is this an oversight in RhinoCommon, or did I not see how to restore a viewport from a given ViewportInfo object?
Hi Menno,
Would you please tell me how to move a view in detail.viewport in a layout?
I mean i have several drawings to arrange in a layout. i am using rhinocommon c# dot net. I need to set
detail.viewport to the right area, where my drawings are.
i never did this in rhinocommon. mostly I busy with geometry algorithm. First time i have to arrange a drawing in rhinocommon.
If you know how to move detail-view to the right place of model view, then please let me know. it should be something to move the view and should be quite easy with right method, but i have no clue…
You cannot transform a viewport. But there are a number of member on RhinoViewport that will allow you to setup the view.
You mentioned that you have several drawings in your 3DM file. If these “drawing” include a title block or are bounded by some kind of border, then you could select the border and then call RhinoViewport.ZoomExtendsSelected, for example.