2D View Orientation Vector

2D View Orientation Vector

Anonymous
Not applicable
1,239 Views
3 Replies
Message 1 of 4

2D View Orientation Vector

Anonymous
Not applicable

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!

0 Likes
Accepted solutions (1)
1,240 Views
3 Replies
Replies (3)
Message 2 of 4

Revitalizer
Advisor
Advisor
Accepted solution

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
Not applicable

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 ?

0 Likes
Message 4 of 4

Revitalizer
Advisor
Advisor

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





0 Likes