Camera Zoom

Camera Zoom

matt_jlt
Collaborator Collaborator
519 Views
1 Reply
Message 1 of 2

Camera Zoom

matt_jlt
Collaborator
Collaborator

Does any one know how to zoom in and out via the API.

 

I can access the camera and eye etc. but cannot find the property related to zoom. I initially thought it was to do with the position of the eye but when I use the "Zoom" by dragging the mouse button I see that the eye position doesn't change.

 

I would like to connect the zoom to a slide bar and zoom in and out using that.
 Can someone point me in the right direction?

 

Thanks, Matt.

0 Likes
520 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Hey,

 

The following vba demonstrates zooming the camera.

 

Dim oCamera As Inventor.Camera
Set oCamera = ThisApplication.ActiveView.Camera

 

Dim dHeight As Double, dWidth As Double

Call oCamera.GetExtents(dWidth, dHeight)

 

Call oCamera.SetExtents(dWidth / 2, dHeight / 2)


Call oCamera.Apply

0 Likes