Orient 3d views to floor plan

Orient 3d views to floor plan

Anonymous
Not applicable
2,087 Views
2 Replies
Message 1 of 3

Orient 3d views to floor plan

Anonymous
Not applicable

I'm trying to create something to automatically create 3d views and orient to different floor plan  views. The problem is i can create 3d views but can't orient them using api. Please help and I'm new to Revit API and programming as well. Thanks in advance.

 

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

keith_white
Autodesk
Autodesk
Accepted solution

Remy has pointed you to some great resources for getting started.  However, you are likely to face a few other issues when trying to mimic the orient to view workflow that the UI offers.  See below for some additional issues you might face when using the API to recreate the orient to view workflow:

  • One of the issues that you will need to address is getting the view range settings of the appropriate projected view and setting that to the 3D view.  Once you get the view range settings from the projected view, you will need to make use of the transform object for the 3D view to map the coordinates of the projected view to the coordiantes of the 3D view.  The posts that Remy linked discuss the use of the transform, so do not take this lightly or forget to pay attention to it.  
  • If dealing with cropped and rotated plan views, you might also need to account for the difference in the origins between the cropped and rotated plan view which is based on the center of the crop box shape while the model origin which is base on model coordinates 0,0,0.  
  • Lastly, when determining the top and bottom planes of section box for the 3D view, you might need to account for the difference in elevation values due to the doc.ActiveProjectLocation.Elevation value being different from the SharedBasePoint.Elevation value.  The difference in these values might result in the section box being higher or lower than expected, because the transform object will not account for the difference in values, but the 3D view will.

I hope this also helps.



Keith White

Principal Solution Architect, Autodesk Consulting