| McNeel Wiki | |||||
| edit · print · help · all topics | |||||
Main Pages
Languages
| QuestionHow can I change the name, or title, or a viewport using the the Rhino SDK? For example, I would like to rename the "Front" viewport to say "Facade". AnswerTo change the title of a viewport, use CRhinoViewport::SetName, or MRhinoViewport::SetName in .NET. A Rhino view contains a "main viewport" that fills the entire view client window. To get a view's main viewport, you can call CRhinoView::MainViewport, or MRhinoView::MainViewport in .NET. For example: C++
CRhinoView* view = RhinoApp().ActiveView();
if (view)
view->MainViewport().SetName("Facade");
C#
MRhinoView view = RhUtil.RhinoApp().ActiveView();
if (view != null)
view.MainViewport().SetName("Facade");
| ||||
| Last Modified [9/18/2008] rename · changes · history · subscriptions · references · file upload | |||||