When I open a model created with Rhino3dm in Rhino, I would like the view to be zoomed to model extents, lets say in Top view.
I guess this would be adding a defined Viewport to the model.AllViews collection, but I’m not sure how to do this.
When I open a model created with Rhino3dm in Rhino, I would like the view to be zoomed to model extents, lets say in Top view.
I guess this would be adding a defined Viewport to the model.AllViews collection, but I’m not sure how to do this.
As I understand it, you would like to create the model with rhino3dm and set the active viewport to be zoomed in on all of the objects? Then when you open it Rhino, you see that zoomed view?
If that’s the case let me see if we have everything exposed to be able to do that. Which language are you working in?
Thanks Anders.
Usually the customer has Rhino running, and just opens the 3dm file that Rhino3dm writes.
But it’s a good alternative to know.
Luis
We write in C# or VB, whichever is easier for an example.
Andrew
@andrew3 As I was putting together an example I noticed an issue with setting the View’s camera position, it does not seem to stick. So one can create a new view and add it to the file, but you cannot change the view’s camera position. I am investigating why this is. I can get it to work in js and py, but not donet (which has different bindings). Will let you know when I have something working.
Luis
Thanks for looking into this for me.
Andrew
[quote=“Andrew, post:7, topic:188887, full:true, username:andrew3”]
Luis
Thanks for looking into this for me.
Luis
Any progress on this?
Andrew
Luis
Just reminding you that thus is an active request, we are hoping for a solution soon.
Andrew
Hello Andrew. We had a fix in place, but it conflicts with the expected behavior of some things in Rhino, so it is not a simple fix and will take time to do properly.
RH-83697 is fixed in Rhino 8 Service Release 14
@brian This is not actually fixed for rhino3dm, it is fixed for Rhino. We need a different approach for rhino3dm.