cameraView

Hi,

Before I want to “save” my current view and after the command I want to “load” my camera location/distance etc. so it will be exactly the same as when I start the function.

I use these 3 for this:

Dim cameraDirection As Vector3d = doc.Views.ActiveView.ActiveViewport.CameraDirection
Dim cameraLocation As Point3d = doc.Views.ActiveView.ActiveViewport.CameraLocation
Dim cameraTarget As Point3d = doc.Views.ActiveView.ActiveViewport.CameraTarget

But I get more zoomed in than the original.
Can someone help me?

might be easier to just save the ViewportInfo from the Viewport you want to preserve and reassign it when done…

ViewportInfo vi=new ViewportInfo(MyViewport);

then later just

MyViewport.SetProjection(vi)…

not in common right now so not sure about those methods but look at viewportinfo or viewinfo classes…

1 Like

probably should work the same.
Thank you for your suggestion and I will try it out :slight_smile: