Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

2D View Orientation Vector

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
971 Views, 3 Replies

2D View Orientation Vector

Hi everyone !

I'm developping a plugin for Revit and i use view3D.GetOrientation() which is very usefull to get the upDirection and forwardDirection vectors. Unfortunatly this method works only with a view3D. Is there a method to get similar vector when the currend view is a 2D view  ? For example i'm working on South Elevation view and i want the method to return 
XYZ upDirection = new XYZ(0, 0, 1);
XYZ forwardDirection = new XYZ(0, 1, 0);

 

I could get every cases using a very huge Use Case but it would never fit every situatiuons.

Any hints ?

Thanks!

3 REPLIES 3
Message 2 of 4
Revitalizer
in reply to: Anonymous

Hi,

 

see View.UpDirection, View.ViewDirection, View.RightDirection and its View.Origin properties for the view's orientation.

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 4
Anonymous
in reply to: Revitalizer

Hey ! Thanks a lot. Unfortunatly i can get but i can't set these properties as they are Read-Only, do you know a way to set them ?

Message 4 of 4
Revitalizer
in reply to: Anonymous

Hi,

 

you could try to set the Transform property of the View's BoundingBox.

http://thebuildingcoder.typepad.com/blog/2012/06/create-section-view-parallel-to-wall.html?cid=6a00e...

 

I tink that will not function with arbitrary values since each view type has its limitations (ViewPlans alsways with XYZ.BasisZ Viewdirection etc.).

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report