.NET

Reply
Active Member
stephanhollaus
Posts: 7
Registered: ‎03-27-2006
Message 1 of 4 (233 Views)

Problem creating rotated Viewport

233 Views, 3 Replies
03-28-2009 10:31 AM
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
Member
dmcknight
Posts: 4
Registered: ‎03-30-2009
Message 2 of 4 (233 Views)

Re: Problem creating rotated Viewport

03-30-2009 12:46 PM 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.
Member
boughannam
Posts: 5
Registered: ‎11-25-2007
Message 3 of 4 (104 Views)

Re: Problem creating rotated Viewport

04-04-2013 12:43 PM in reply to: stephanhollaus

Hi,

 

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

ADN Support Specialist
Balaji_Ram
Posts: 749
Registered: ‎03-21-2011
Message 4 of 4 (75 Views)

Re: Problem creating rotated Viewport

04-17-2013 04:21 AM 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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.