.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem creating rotated Viewport

3 REPLIES 3
Reply
Message 1 of 4
stephanhollaus
457 Views, 3 Replies

Problem creating rotated Viewport

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
3 REPLIES 3
Message 2 of 4
dmcknight
in reply to: stephanhollaus

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.
Message 3 of 4
boughannam
in reply to: stephanhollaus

Hi,

 

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

Message 4 of 4
Balaji_Ram
in reply to: boughannam

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost