.NET

Reply
*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 1 of 7 (400 Views)

Find Rotation Angle of the current View

400 Views, 6 Replies
02-03-2012 09:48 AM

I'm looking to find the current rotation of my view in modelspace.

This isn't the ucs directionm but any arbitrary view i'm using.

For example using 3dorbit to rotate around an object.

I want to match some temp graphics to align flat to my view.

 

EDIT:

I see there is a VIEWDIR variable. so that may be what I need

 

---------------------------



(defun botsbuildbots() (botsbuildbots))
*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 7 (384 Views)

Re: Find Rotation Angle of the current View

02-03-2012 12:18 PM in reply to: arcticad

Just a shot in the dark

GetSystemVariable("ucsxdir") maybe

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 3 of 7 (380 Views)

Re: Find Rotation Angle of the current View

02-03-2012 01:28 PM in reply to: Hallex

ucsxdir gives me the angle of the ucs and not the angle of the view as I am currently looking at it.

 

Thank You for the effort. It's appreciated.

---------------------------



(defun botsbuildbots() (botsbuildbots))
Valued Mentor
KerryBrown
Posts: 269
Registered: ‎11-29-2008
Message 4 of 7 (365 Views)

Re: Find Rotation Angle of the current View

02-03-2012 05:17 PM in reply to: arcticad
public Vector3d get_ViewDirection();
 
Declaring Type: Autodesk.AutoCAD.DatabaseServices.Viewport 
Assembly: Acdbmgd, Version=18.2.0.0 

 

//-------------------------------------------------------

class keyThumper<T> : Lazy<T>;      another  Swamper

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 5 of 7 (322 Views)

Re: Find Rotation Angle of the current View

02-06-2012 10:19 AM in reply to: arcticad

Can you give a code sample on how to access it. I'm not finding any examples.

 

---------------------------



(defun botsbuildbots() (botsbuildbots))
Valued Mentor
KerryBrown
Posts: 269
Registered: ‎11-29-2008
Message 6 of 7 (312 Views)

Re: Find Rotation Angle of the current View

02-06-2012 04:07 PM in reply to: arcticad

 

This may have some info

 

http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html?url=WS1a919382...

//-------------------------------------------------------

class keyThumper<T> : Lazy<T>;      another  Swamper

*Expert Elite*
arcticad
Posts: 1,285
Registered: ‎06-21-2004
Message 7 of 7 (278 Views)

Re: Find Rotation Angle of the current View

02-10-2012 11:05 AM in reply to: arcticad

I found the answer here

http://usa.autodesk.com/adsk/servlet/index?id=18162650&siteID=123112

in lesson 8

---------------------------



(defun botsbuildbots() (botsbuildbots))
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.