I’m looking for a way to modify the layout/size of the standard Rhino views using the RhinoCommon API. I want to be able to programatically modify the vertical split ratio so that they look something like this:
I’ve tried modifying RhinoViewport.Size on each of the active viewports and it has no effect on the view panes, only the internal viewport so I get some weird looking stuff like this:
I should have pointed you to RhinoView.Size instead.
For instance
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
var av = doc.Views.ActiveView;
av.Size = new System.Drawing.Size(20, 20);
return Result.Success;
}
My plugin is an application-specific tool for processing existing models. One of the processes involves the user aligning one component to another using UI controls. The view that is most critical for manually sighting this alignment is the front view, so I’d like to make this nice and big to reduce the chance of error. I would just maximize the view but it’s also important that they have some visibility on the top and perspective views during the process to verify other aspects of the alignment. Do you have any suggestions on how I may achieve a similar outcome? Even being able to set two horizontal views like this would be good:
The problem is I need do it dynamically from code. Rhino isn’t interactive from my soft. The views size have to be fixed from code. That command opens a form for introducing values. Can I pass fixed values to this form from RhinoCommon.