Camera UpVector

Camera UpVector

Anonymous
Not applicable
1,252 Views
12 Replies
Message 1 of 13

Camera UpVector

Anonymous
Not applicable
I have been trying to figure out how the Camera UpVector works. I started out with a
straight on view of the XY plane. Got the UpVector XYZ settings, rotated 90CCW and got
them again etc. See below. The first line is the XYZ values and the second is the
ViewOrientation type. You can see when I had gone a full 360 I have different values
than what I started with. I guess I don't get the whole concept. I would have
expected the value to be in radians and changing on the Z axis.

Is there a reasonably easy way to rotate a view 90º CW or CCW? I can't come up with a
good way just by looking at the existing values.


0,1,0
10764

1,2.22044604925031E-16,0
10763

4.44089209850063E-16,-1,0
10763

-1,-6.66133814775094E-16,0
10763

-8.88178419700125E-16,1,0
10764

1,1.11022302462516E-15,0
10763

1.33226762955019E-15,-1,0
10763

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program
0 Likes
1,253 Views
12 Replies
Replies (12)
Message 2 of 13

Anonymous
Not applicable
Never mind... I think I got most of it sorted out... now if I can just figure out how to
manipulate it. 8^)

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program



"Kent Keller" wrote in message
news:3BE8B7A02ADC2F5ABE2A42D99A4F1EE0@in.WebX.maYIadrTaRb...
>
> I have been trying to figure out how the Camera UpVector works.
0 Likes
Message 3 of 13

Anonymous
Not applicable
I'm Back 8^)

I tried the basic code below and it works for one Revolution, but then not the next.
If you manually rotate the view another 90 then the code works again. I am guessing
what is happening is the UnitVector is seeing that it is going to be a impossible
coordinate so it errors. I have tried setting the coordinates in a normal Vector first,
and then using it to supply the UnitVector with them all at once, but it says it is a type
mismatch. I also tried making a dummy array and supplying that to the UnitVector but that
didn't work either.

So I am back to how do you rotate a view90º

Dim oUp As UnitVector
Set oUp = ocamera.UpVector
oUp.X = ocamera.UpVector.Y
oUp.Y = -ocamera.UpVector.X
oUp.Z = ocamera.UpVector.Z

ocamera.UpVector = oUp
ocamera.Apply

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program
0 Likes
Message 4 of 13

Anonymous
Not applicable
Hi Kent,

Sometime back I began writing an article on handling views in Inventor
through API but stalled it for
a while as I got sucked into other activities.

UpVector is the vector that is vertical or rather that would be parallel to
the left frame of the document window.

To understand it better:
1. Open any part file and switch to any isometric view.

2. Use the following code to change the upvector:
Sub test()
Dim ocam As Camera
Set ocam = ThisDocument.Views(1).Camera

Dim ovec As UnitVector
Set ovec = ThisApplication.TransientGeometry.CreateUnitVector(0, 0, 1)

ocam.UpVector = ovec

ocam.Apply

End Sub

3. The above code makes the Z axis (Blue) to be pointing vertically upwards.
Similarly if you input (1,0,0) then X axis (Red) will be pointing vertically
upwards.

You may try with various inputs.....such as (1,1,0)

cheers,
thilak


"Kent Keller" wrote in message
news:736D07C3600E36A7BF882B5426497DDD@in.WebX.maYIadrTaRb...
> I'm Back 8^)
>
> I tried the basic code below and it works for one Revolution, but
then not the next.
> If you manually rotate the view another 90 then the code works again. I
am guessing
> what is happening is the UnitVector is seeing that it is going to be a
impossible
> coordinate so it errors. I have tried setting the coordinates in a
normal Vector first,
> and then using it to supply the UnitVector with them all at once, but it
says it is a type
> mismatch. I also tried making a dummy array and supplying that to the
UnitVector but that
> didn't work either.
>
> So I am back to how do you rotate a view90º
>
> Dim oUp As UnitVector
> Set oUp = ocamera.UpVector
> oUp.X = ocamera.UpVector.Y
> oUp.Y = -ocamera.UpVector.X
> oUp.Z = ocamera.UpVector.Z
>
> ocamera.UpVector = oUp
> ocamera.Apply
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
>
>
0 Likes
Message 5 of 13

Anonymous
Not applicable
Thanks Thilak


I have made a dialog that lists the Eye coords, the Target Coords and the UpVector coords
for any view that I click a button in. This has helped a lot but from what I have seen I
am guessing there must be a way to use some sort of transformation matrix to deal with it
or??

What I am trying to do in one case is to mimic the way the view reacts if you click on a
edge of the Glass Box. The right and left code below works if you are looking at the XY
plane, but any other plane and it doesn't The up and down code has some problems I
haven't figured out yet, but I would guess if I found the problem it would also only be
valid when viewing from one direction. What I am trying to do there is to rotate 90 on
the viewing X axis similar to in AutoCAD... UCS, X, 90, Plan

Often times after the line ocamera.UpVector = oNewUp the two sets of values don't match??

So is there a matrix I need to use, or do I have to try to map out every possibility for
the ortho views or ??

Thanks for any help.

Dim oView As View
Set oView = oApp.ActiveView
Dim ocamera As Camera
Set ocamera = oView.Camera
Dim oVect As UnitVector
Set oVect = ocamera.UpVector

Select Case Index
Case 0 ' Spin Right
Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
ocamera.UpVector.Y, -ocamera.UpVector.X, ocamera.UpVector.Z)

Case 1 ' Spin Left
Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
-ocamera.UpVector.Y, ocamera.UpVector.X, ocamera.UpVector.Z)

Case 2 ' Up
Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
ocamera.UpVector.X, ocamera.UpVector.Z, -ocamera.UpVector.Y)

Case 3 ' Down
Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
ocamera.UpVector.X, -ocamera.UpVector.Z, ocamera.UpVector.Y)

Case Else
Exit Sub

End Select

ocamera.UpVector = oNewUp
ocamera.Apply




--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program



"raot" wrote in message
news:E1C3EC0BD2D49D424D2E90301AD9EF9C@in.WebX.maYIadrTaRb...
> Hi Kent,
>
> Sometime back I began writing an article on handling views in Inventor
> through API but stalled it for
> a while as I got sucked into other activities.
>
> UpVector is the vector that is vertical or rather that would be parallel to
> the left frame of the document window.
>
> To understand it better:
> 1. Open any part file and switch to any isometric view.
>
> 2. Use the following code to change the upvector:
> Sub test()
> Dim ocam As Camera
> Set ocam = ThisDocument.Views(1).Camera
>
> Dim ovec As UnitVector
> Set ovec = ThisApplication.TransientGeometry.CreateUnitVector(0, 0, 1)
>
> ocam.UpVector = ovec
>
> ocam.Apply
>
> End Sub
>
> 3. The above code makes the Z axis (Blue) to be pointing vertically upwards.
> Similarly if you input (1,0,0) then X axis (Red) will be pointing vertically
> upwards.
>
> You may try with various inputs.....such as (1,1,0)
>
> cheers,
> thilak
>
>
> "Kent Keller" wrote in message
> news:736D07C3600E36A7BF882B5426497DDD@in.WebX.maYIadrTaRb...
> > I'm Back 8^)
> >
> > I tried the basic code below and it works for one Revolution, but
> then not the next.
> > If you manually rotate the view another 90 then the code works again. I
> am guessing
> > what is happening is the UnitVector is seeing that it is going to be a
> impossible
> > coordinate so it errors. I have tried setting the coordinates in a
> normal Vector first,
> > and then using it to supply the UnitVector with them all at once, but it
> says it is a type
> > mismatch. I also tried making a dummy array and supplying that to the
> UnitVector but that
> > didn't work either.
> >
> > So I am back to how do you rotate a view90º
> >
> > Dim oUp As UnitVector
> > Set oUp = ocamera.UpVector
> > oUp.X = ocamera.UpVector.Y
> > oUp.Y = -ocamera.UpVector.X
> > oUp.Z = ocamera.UpVector.Z
> >
> > ocamera.UpVector = oUp
> > ocamera.Apply
> >
> > --
> > Kent
> > Assistant Moderator
> > Autodesk Discussion Forum Moderator Program
> >
> >
> >
> >
>
>
0 Likes
Message 6 of 13

Anonymous
Not applicable
Kent,

Using an entirely different approach, the following code WILL rotate your view 90 degrees
around the X axis, but it is probably not exactly what you are looking for, nor how accurate
it proves to be over continued use.

Bob Schader

Code snippet:
'This is the number representing one degree
' in Inventor's Camera.ComputeWithMouseInput Method
' I figured this out by determining through experimentation
' that 90 degrees is represented as 10 * pi
Const rfactor As Double = 0.3490658504

Public Sub RotX90()
' This example simply rotates the view -90 degrees around x axis.
' Change the rval1 value to get other rotations
Dim aView As View
Dim camera As camera
Dim FPoint As Point2d
Dim TPoint1 As Point2d 'rotation points
Dim rval1 As Double 'rotation values
Dim yval As Double
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument

rval1 = -90 * rfactor

Set FPoint = ThisApplication.TransientGeometry.CreatePoint2d(0, 0)
Set TPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(0, rval1)
Set aView = ThisApplication.ActiveView
Set camera = aView.camera

camera.ComputeWithMouseInput FPoint, TPoint1, 0, kRotateViewOperation
camera.Fit
camera.Apply
aView.Update
ThisApplication.ActiveDocument.Update

End Sub


"Kent Keller" wrote in message news:8B0DB107941C183E37AC3ED61D927BD2@in.WebX.maYIadrTaRb...
> Thanks Thilak
>
>
> I have made a dialog that lists the Eye coords, the Target Coords and the UpVector coords
> for any view that I click a button in. This has helped a lot but from what I have seen I
> am guessing there must be a way to use some sort of transformation matrix to deal with it
> or??
>
> What I am trying to do in one case is to mimic the way the view reacts if you click on a
> edge of the Glass Box. The right and left code below works if you are looking at the XY
> plane, but any other plane and it doesn't The up and down code has some problems I
> haven't figured out yet, but I would guess if I found the problem it would also only be
> valid when viewing from one direction. What I am trying to do there is to rotate 90 on
> the viewing X axis similar to in AutoCAD... UCS, X, 90, Plan
>
> Often times after the line ocamera.UpVector = oNewUp the two sets of values don't match??
>
> So is there a matrix I need to use, or do I have to try to map out every possibility for
> the ortho views or ??
>
> Thanks for any help.
>
> Dim oView As View
> Set oView = oApp.ActiveView
> Dim ocamera As Camera
> Set ocamera = oView.Camera
> Dim oVect As UnitVector
> Set oVect = ocamera.UpVector
>
> Select Case Index
> Case 0 ' Spin Right
> Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
> ocamera.UpVector.Y, -ocamera.UpVector.X, ocamera.UpVector.Z)
>
> Case 1 ' Spin Left
> Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
> -ocamera.UpVector.Y, ocamera.UpVector.X, ocamera.UpVector.Z)
>
> Case 2 ' Up
> Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
> ocamera.UpVector.X, ocamera.UpVector.Z, -ocamera.UpVector.Y)
>
> Case 3 ' Down
> Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
> ocamera.UpVector.X, -ocamera.UpVector.Z, ocamera.UpVector.Y)
>
> Case Else
> Exit Sub
>
> End Select
>
> ocamera.UpVector = oNewUp
> ocamera.Apply
>
>
>
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
>
> "raot" wrote in message
> news:E1C3EC0BD2D49D424D2E90301AD9EF9C@in.WebX.maYIadrTaRb...
> > Hi Kent,
> >
> > Sometime back I began writing an article on handling views in Inventor
> > through API but stalled it for
> > a while as I got sucked into other activities.
> >
> > UpVector is the vector that is vertical or rather that would be parallel to
> > the left frame of the document window.
> >
> > To understand it better:
> > 1. Open any part file and switch to any isometric view.
> >
> > 2. Use the following code to change the upvector:
> > Sub test()
> > Dim ocam As Camera
> > Set ocam = ThisDocument.Views(1).Camera
> >
> > Dim ovec As UnitVector
> > Set ovec = ThisApplication.TransientGeometry.CreateUnitVector(0, 0, 1)
> >
> > ocam.UpVector = ovec
> >
> > ocam.Apply
> >
> > End Sub
> >
> > 3. The above code makes the Z axis (Blue) to be pointing vertically upwards.
> > Similarly if you input (1,0,0) then X axis (Red) will be pointing vertically
> > upwards.
> >
> > You may try with various inputs.....such as (1,1,0)
> >
> > cheers,
> > thilak
> >
> >
> > "Kent Keller" wrote in message
> > news:736D07C3600E36A7BF882B5426497DDD@in.WebX.maYIadrTaRb...
> > > I'm Back 8^)
> > >
> > > I tried the basic code below and it works for one Revolution, but
> > then not the next.
> > > If you manually rotate the view another 90 then the code works again. I
> > am guessing
> > > what is happening is the UnitVector is seeing that it is going to be a
> > impossible
> > > coordinate so it errors. I have tried setting the coordinates in a
> > normal Vector first,
> > > and then using it to supply the UnitVector with them all at once, but it
> > says it is a type
> > > mismatch. I also tried making a dummy array and supplying that to the
> > UnitVector but that
> > > didn't work either.
> > >
> > > So I am back to how do you rotate a view90º
> > >
> > > Dim oUp As UnitVector
> > > Set oUp = ocamera.UpVector
> > > oUp.X = ocamera.UpVector.Y
> > > oUp.Y = -ocamera.UpVector.X
> > > oUp.Z = ocamera.UpVector.Z
> > >
> > > ocamera.UpVector = oUp
> > > ocamera.Apply
> > >
> > > --
> > > Kent
> > > Assistant Moderator
> > > Autodesk Discussion Forum Moderator Program
> > >
> > >
> > >
> > >
> >
> >
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
0 Likes
Message 7 of 13

Anonymous
Not applicable
Actually, I should clarify that the code I posted rotates the view around the current
SCREEN or "VIEW" X axis, not the "UCS" axis.
Bob

"Bob Schader" wrote in message news:016E5DC1A1F13537A9A7BE006B136330@in.WebX.maYIadrTaRb...
> Kent,
>
> Using an entirely different approach, the following code WILL rotate your view 90 degrees
> around the X axis, but it is probably not exactly what you are looking for, nor how accurate
> it proves to be over continued use.
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
0 Likes
Message 8 of 13

Anonymous
Not applicable
Hi Bob

I (along with some help) was able to come up with this that seems to work pretty well at
least in VBA code. I just tried to transfer it to my addin, and it is whacking out the
view?? Fun and games.

Private Sub cmdLeft_Click()

Dim oview As View
Set oview = ThisApplication.ActiveView
Dim ocamera As Camera
Set ocamera = oview.Camera

Dim oCamVect As UnitVector

Set oCamVect = ThisApplication.TransientGeometry.CreateUnitVector( _
            ocamera.Eye.x - ocamera.Target.x, ocamera.Eye.Y - ocamera.Target.Y,
ocamera.Eye.Z - ocamera.Target.Z)

ocamera.UpVector = ocamera.UpVector.CrossProduct(oCamVect)
ocamera.Apply

End Sub


--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program



"Bob Schader" wrote in message
news:016E5DC1A1F13537A9A7BE006B136330@in.WebX.maYIadrTaRb...
> Kent,
>
> Using an entirely different approach, the following code WILL rotate your view 90
degrees
0 Likes
Message 9 of 13

Anonymous
Not applicable
Somehow I have gotten most of what I want to work. One thing left that is giving me
some trouble is how do I reset the target to the middle of the screen? similar to how the
rotate tool does when you left click inside it.

If I make a cube way away from the origin, .. turn on the origin point and then do a zoom
extents, and finally zoom in on my part when I rotate it it fly's off in space because the
target is still some point I presume somewhere between the origin point and my cube. If
I do the same steps but before running my routine I use the rotate toolbutton and recenter
the view, then I rotate nicely around my part. So how do I mimic that or how do I set
the Target to the center of the viewing screen?

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program
0 Likes
Message 10 of 13

Anonymous
Not applicable
I'm still trying to learn VBA, but can you get the window extents and then
calculate the center from that? I found this in the Help file:

Method that returns the current size and position of the view's window.

Syntax
GetWindowExtents(
Top As Long,
Left As Long,
height As Long,
width As Long)

Top Output Long that contains the position of the top of the window. The
value returned is in pixels relative to screen space.

Left Output Long that contains the position of the left of the window. The
value returned is in pixels relative to screen space.

height Output Long that contains the height of the window. The value
returned is in pixels.

width Output Long that contains the width of the window. The value returned
is in pixels.
0 Likes
Message 11 of 13

Anonymous
Not applicable
Hi Mike

Thanks, but I believe that is just the overall size of the window, and doesn't have
much to do with where in space the window is looking.

One of the things I have noticed is that if I do a mouse wheel zoom the target doesn't
get reset to the view, but if I use the zoom toolbutton it does. Just need to figure out
how to do that reset in code. 8^)

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program



"Mike Maenpaa" wrote in message
news:535B00513C57D65594F272AC8D1D4F19@in.WebX.maYIadrTaRb...
> I'm still trying to learn VBA, but can you get the window extents and then
> calculate the center from that? I found this in the Help file:
0 Likes
Message 12 of 13

Anonymous
Not applicable
Here's some code that will handle the general case of rotating the camera
any specified angle. The first Sub is used to test the UpVectorRotate
function which does all of the work. Hopefully this will help.

Public Sub RotateTest()
' Define Pi.
Dim Pi As Double
Pi = 3.14159265358979

' Rotate the camera 90 degrees using transition type of apply
Dim oCamera As Camera
Set oCamera = ThisApplication.ActiveView.Camera
Call UpVectorRotate(oCamera, Pi / 2)
oCamera.Apply

' Rotate another 90 degrees.
Call UpVectorRotate(oCamera, Pi / 2)
oCamera.Apply

' Rotate another 90 degrees.
Call UpVectorRotate(oCamera, Pi / 2)
oCamera.Apply

' Rotate the camera in 10 degree increments a full 360 degrees.
' This applies without a transition so the camera jumps right
' to the position defined.
Dim i As Long
For i = 1 To 36
Call UpVectorRotate(oCamera, Pi / 18)
oCamera.ApplyWithoutTransition
Next
End Sub

Public Sub UpVectorRotate(ByRef Camera As Camera, ByVal RotateAngle As
Double)
' Create a vector that defines the rotation axis.
Dim RotateAxis As Vector
Set RotateAxis =
ThisApplication.TransientGeometry.CreateVector(Camera.Target.X -
Camera.Eye.X, _
Camera.Target.Y - Camera.Eye.Y, Camera.Target.Z -
Camera.Eye.Z)

' Set-up the matrix that defines the rotation about the axis by the
specified angle.
Dim oRotMatrix As Matrix
Set oRotMatrix = ThisApplication.TransientGeometry.CreateMatrix
Call oRotMatrix.SetToRotation(RotateAngle, RotateAxis, Camera.Eye)

' Define a matrix that defines a point along the up vector.
Dim oUpVector As UnitVector
Set oUpVector = Camera.UpVector
Call oUpVector.TransformBy(oRotMatrix)

' Set the up vector of the camera.
Camera.UpVector = oUpVector
End Sub

-Brian

"Kent Keller" wrote in message
news:1C0448F608CF6FCF57843CF3A4622512@in.WebX.maYIadrTaRb...
> Hi Mike
>
> Thanks, but I believe that is just the overall size of the window, and
doesn't have
> much to do with where in space the window is looking.
>
> One of the things I have noticed is that if I do a mouse wheel zoom
the target doesn't
> get reset to the view, but if I use the zoom toolbutton it does. Just
need to figure out
> how to do that reset in code. 8^)
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
>
> "Mike Maenpaa" wrote in message
> news:535B00513C57D65594F272AC8D1D4F19@in.WebX.maYIadrTaRb...
> > I'm still trying to learn VBA, but can you get the window extents and
then
> > calculate the center from that? I found this in the Help file:
>
>
0 Likes
Message 13 of 13

Anonymous
Not applicable
Thanks again Brian.

I think the rotate 90 stuff I posted a couple of posts up, works reasonably well. The
main difference I see off hand is that you are using a matrix, and I am using
CrossProduct.

The one that still has me a bit stumped is if I zoom into a area using the mouse it
seems like the Target doesn't get set to the new view, so if you rotate with something
like this and use the current views Target, then you fly off to space. If you use the
Zoom toolbutton instead you rotate reasonably close around the view.

Set oNewEye = oApp.TransientGeometry.CreatePoint( _
-1000000, 1000000, 1000000)
Set oNewUp = oApp.TransientGeometry.CreateUnitVector( _
0.408248290463863, 0.816496580927726, -0.408248290463863)

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program



"Brian Ekins (Autodesk)" wrote in message
news:7B1F79E144E0611A82AF527BB3A01F1B@in.WebX.maYIadrTaRb...
> Here's some code that will handle the general case of rotating the camera
> any specified angle. The first Sub is used to test the UpVectorRotate
> function which does all of the work. Hopefully this will help.
>
> Public Sub RotateTest()
> ' Define Pi.
> Dim Pi As Double
> Pi = 3.14159265358979
>
> ' Rotate the camera 90 degrees using transition type of apply
> Dim oCamera As Camera
> Set oCamera = ThisApplication.ActiveView.Camera
> Call UpVectorRotate(oCamera, Pi / 2)
> oCamera.Apply
>
> ' Rotate another 90 degrees.
> Call UpVectorRotate(oCamera, Pi / 2)
> oCamera.Apply
>
> ' Rotate another 90 degrees.
> Call UpVectorRotate(oCamera, Pi / 2)
> oCamera.Apply
>
> ' Rotate the camera in 10 degree increments a full 360 degrees.
> ' This applies without a transition so the camera jumps right
> ' to the position defined.
> Dim i As Long
> For i = 1 To 36
> Call UpVectorRotate(oCamera, Pi / 18)
> oCamera.ApplyWithoutTransition
> Next
> End Sub
>
> Public Sub UpVectorRotate(ByRef Camera As Camera, ByVal RotateAngle As
> Double)
> ' Create a vector that defines the rotation axis.
> Dim RotateAxis As Vector
> Set RotateAxis =
> ThisApplication.TransientGeometry.CreateVector(Camera.Target.X -
> Camera.Eye.X, _
> Camera.Target.Y - Camera.Eye.Y, Camera.Target.Z -
> Camera.Eye.Z)
>
> ' Set-up the matrix that defines the rotation about the axis by the
> specified angle.
> Dim oRotMatrix As Matrix
> Set oRotMatrix = ThisApplication.TransientGeometry.CreateMatrix
> Call oRotMatrix.SetToRotation(RotateAngle, RotateAxis, Camera.Eye)
>
> ' Define a matrix that defines a point along the up vector.
> Dim oUpVector As UnitVector
> Set oUpVector = Camera.UpVector
> Call oUpVector.TransformBy(oRotMatrix)
>
> ' Set the up vector of the camera.
> Camera.UpVector = oUpVector
> End Sub
>
> -Brian
>
> "Kent Keller" wrote in message
> news:1C0448F608CF6FCF57843CF3A4622512@in.WebX.maYIadrTaRb...
> > Hi Mike
> >
> > Thanks, but I believe that is just the overall size of the window, and
> doesn't have
> > much to do with where in space the window is looking.
> >
> > One of the things I have noticed is that if I do a mouse wheel zoom
> the target doesn't
> > get reset to the view, but if I use the zoom toolbutton it does. Just
> need to figure out
> > how to do that reset in code. 8^)
> >
> > --
> > Kent
> > Assistant Moderator
> > Autodesk Discussion Forum Moderator Program
> >
> >
> >
> > "Mike Maenpaa" wrote in message
> > news:535B00513C57D65594F272AC8D1D4F19@in.WebX.maYIadrTaRb...
> > > I'm still trying to learn VBA, but can you get the window extents and
> then
> > > calculate the center from that? I found this in the Help file:
> >
> >
>
>
0 Likes