.NET

.NET

Reply
*Expert Elite*
1,286 Posts
37 Kudos
Registered: ‎06-21-2004
Post 1 of 7

Find Rotation Angle of the current View

430 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*
1,569 Posts
171 Kudos
Registered: ‎10-08-2008
Post 2 of 7

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*
1,286 Posts
37 Kudos
Registered: ‎06-21-2004
Post 3 of 7

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
278 Posts
22 Kudos
Registered: ‎11-29-2008
Post 4 of 7

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 

 

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

Everything will work just as you expect it to, unless your expectations are incorrect.

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

*Expert Elite*
1,286 Posts
37 Kudos
Registered: ‎06-21-2004
Post 5 of 7

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
278 Posts
22 Kudos
Registered: ‎11-29-2008
Post 6 of 7

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...

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

Everything will work just as you expect it to, unless your expectations are incorrect.

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

*Expert Elite*
1,286 Posts
37 Kudos
Registered: ‎06-21-2004
Post 7 of 7

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))
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!