Drawing View via iLogic or VBA

Drawing View via iLogic or VBA

Anonymous
Not applicable
369 Views
1 Reply
Message 1 of 2

Drawing View via iLogic or VBA

Anonymous
Not applicable

Is there a way to align a view with a plane.  So I have a plane "Detail 1" that is 45 Degrees to XY Plane.  I would like the iLogic to change the Base View in the Sheet to "Look at" "Detail 1" instead of the standard view enumerators.  I can't seem to find the code to do this.  This is because "Detail 1" will not always be 45 Degrees to XY Plane but it could vary.  Anyone have an idea?

 

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

matthew.greenDLCDJ
Contributor
Contributor

I think I finally got something to work.  Its based off the camera.

Dim cam As Camera
cam = ActiveSheet.View("VIEW4").View.Camera

ang = 180

x = 10000 * Cos(ang / 360 * (2 * PI))
Z = 10000 * Sin(ang / 360 * (2 * PI))

cam.Eye = ThisApplication.TransientGeometry.CreatePoint(x, 0, Z)
cam.UpVector = ThisApplication.TransientGeometry.CreateUnitVector(0, 1, 0)
cam.ApplyWithoutTransition
0 Likes