I want know how to get the viewport resolution via the SDK. The language is C#.
public override IRhinoCommand.result RunCommand(IRhinoCommandContext context) { MRhinoView view = RhUtil.RhinoApp().ActiveView(); if (null != view) { string name = view.ActiveViewport().Name(); int left = 0, right = 0, bottom = 0, top = 0; view.ActiveViewport().VP().GetScreenPort( ref left, ref right, ref bottom, ref top); int width = right - left; int height = bottom - top; RhUtil.RhinoApp().Print(string.Format("Name = {0}: Width = {1}, Height = {2}\n", name, width, height)); } return IRhinoCommand.result.cancel; }