Viewport in the form

Hello ,

I need create a windows form with Rhino viewport, Any idea how I can make this ??

Thanks

Hi @MatrixRatrix,

RhinoCommon does not provide a way of embedding a full-featured viewport into a form or dialog.

However, Rhino.UI has a simple view-only control - 'Rhino.UI.Controls.ViewportControl`. Here is a simple example of how to use it.

– Dale

1 Like

Hi @dale , and add layout viewport ? is possible ?

Thanks

Hi @MatrixRatrix,

Sure. To add a layout, you can either script the -Layout command, or use the ViewTable.AddPageView RhinoCommon method.

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

– Dale

@dale ,

This Add layout on form?? if so, how?

No, this adds a layout to the document.

– Dale