• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    Find Rotation Angle of the current View

    265 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

     

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



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.
    *Expert Elite*
    Hallex
    Posts: 1,332
    Registered: ‎10-08-2008

    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
    Please use plain text.
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    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.

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



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.
    Valued Mentor
    KerryBrown
    Posts: 259
    Registered: ‎11-29-2008

    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


    I do not endorse the social media app links below:smileyembarrassed:

    Please use plain text.
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    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.

     

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



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.
    Valued Mentor
    KerryBrown
    Posts: 259
    Registered: ‎11-29-2008

    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


    I do not endorse the social media app links below:smileyembarrassed:

    Please use plain text.
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    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

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



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.