Grasshopper

algorithmic modeling for Rhino

For some reason I can't get the method:

doc.Views.ActiveView.ActiveViewport.Magnify

to work in a C# component.

It looks like everything should be working fine. Is there a conflict between setting the camera location and then using magnify?

 

Here's the Code:


private void RunScript(Point3d cameraPoint, Point3d targetPoint, double magnificationFactor, ref object A)  {
    doc.Views.ActiveView.ActiveViewport.SetCameraLocations(targetPoint, cameraPoint);  
    doc.Views.ActiveView.ActiveViewport.Magnify(magnificationFactor, 0);  
    A = magnificationFactor;
  }

 

Thanks,

Ben

Views: 225

Attachments:

Replies to This Discussion

Hi Benjamin,

 

the function returns False, so at least it knows it's not doing anything. I'm not sure yet why it's returning false. I'll need to debug my way into Rhino core which takes a while to set up.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service