McNeel Wiki
Setting a Viewport's Title
edit · print · help · all topics
Main Pages

AccuRender

Bongo

Brazil r/s

Developer

Flamingo

Penguin

Rhino Blogs

Rhino

Rhino Labs

Search

Languages

Česky

Deutsch

English

Español

Français

Italiano

Polish

日本語

한국어

中文(繁體)

中文(简体)

 
.
DeveloperC++, .NET
VersionRhino 4.0
SummaryDemonstrates how to set the title of a viewport using the Rhino 4.0 SDK.

Question

How 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".

Answer

To 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