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

Find Rotation Angle of the current View

8 REPLIES 8
Reply
Message 1 of 9
arcticad
2489 Views, 8 Replies

Find Rotation Angle of the current View

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))
8 REPLIES 8
Message 2 of 9
Hallex
in reply to: arcticad

Just a shot in the dark

GetSystemVariable("ucsxdir") maybe

 

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Message 3 of 9
arcticad
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))
Message 4 of 9
kdub_nz
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

Message 5 of 9
arcticad
in reply to: arcticad

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

 

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



(defun botsbuildbots() (botsbuildbots))
Message 6 of 9
kdub_nz
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

Message 7 of 9
arcticad
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))
Message 8 of 9
dnicholsonZCTRT
in reply to: arcticad

Can you share a better link? I can't find a lesson 8.

 

Thanks.

Message 9 of 9


@dnicholsonZCTRT wrote:

Can you share a better link? I can't find a lesson 8.

 

Thanks.


https://knowledge.autodesk.com/support/autocad/learn-explore/caas/simplecontent/content/lesson-8-bon...

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

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