Problem creating rotated Viewport

Problem creating rotated Viewport

Anonymous
Not applicable
1,041 Views
3 Replies
Message 1 of 4

Problem creating rotated Viewport

Anonymous
Not applicable
Hi

I'm trying to create a rotated vie but have a big problem. When I create the View "non rotated" everythig is fine. But when I try to rotate the View via twistangle the Viewcenter is wrong.
Here is my Code

Dim tAF As New DatabaseServices.Viewport

tAF.ViewCenter = midpnt
tAF.CenterPoint = AfCenterPoint
tAF.Width = AFWitdth
tAF.Height = AFHeigth
tAF.ViewHeight = imgHeigt
Dim LayIDAF As DatabaseServices.ObjectId = ISHAcTools.createLayer(ta, doc.Database, "MANSFEN")
tAF.LayerId = LayIDAF
tAF.TwistAngle = ImgCom.Rotation
tLayoutBlDef.AppendEntity(tAF)
ta.AddNewlyCreatedDBObject(tAF, True)

Can anybody tell me where the problem is?

thx

sincerly
0 Likes
1,042 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Since you typically have to choose something within the viewport to use "twist", I would guess that you have to choose items within that viewport.
0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi,

 

I have the same problem. Did you find a solution.

0 Likes
Message 4 of 4

Balaji_Ram
Alumni
Alumni

Hi,

 

Here is a blog post that explains the ViewTwist calculation :

http://adndevblog.typepad.com/autocad/2012/06/calculating-viewtwist-variable.html

 

Can you please verify if the view twist that you are providing is correct ?

 



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes