.NET

.NET

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

Find Rotation Angle of the current View

423 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 (407 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,286
Registered: ‎06-21-2004
Message 3 of 7 (403 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: 278
Registered: ‎11-29-2008
Message 4 of 7 (388 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 

 

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

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

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

*Expert Elite*
arcticad
Posts: 1,286
Registered: ‎06-21-2004
Message 5 of 7 (345 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: 278
Registered: ‎11-29-2008
Message 6 of 7 (335 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...

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

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

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

*Expert Elite*
arcticad
Posts: 1,286
Registered: ‎06-21-2004
Message 7 of 7 (301 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))
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.