algorithmic modeling for Rhino
Hello all,
I'm working on legend display with the add-on "Human".
With that add-on, I can float text and colored mesh on the viewport. You can see my process on the attached image file.
What I want to do is, to explore viewport with MD slider. In fact, I did partially, but I have to input resolution x-y pixels of current viewport.
If I can get the resolution of current active viewport dynimically, it'll be really helpful for me. Unfortunately, I have no experience on VB or C# components. I need somebody to make those custom componets to get resolution.
Thanks for reading my question. I'll wait for your reply.
Tags:
You could use something like this:
private void RunScript(string vp, ref object Height, ref object Width, ref object Viewport)
{
var view = RhinoDoc.ActiveDoc.Views.Find(vp, false);
if (view == null)
{
view = RhinoDoc.ActiveDoc.Views.ActiveView;
}
Height = view.ActiveViewport.Bounds.Height;
Width = view.ActiveViewport.Bounds.Width;
Viewport = view.ActiveViewport.Name;
}
Thanks Arend! it's really helpful.
I input "Button" component instead of viewport's name. :)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by