Elevation View - Index number from View

Anonymous

Elevation View - Index number from View

Anonymous
Not applicable

Hi,

How can I get the index number of the elevation view after I create this?

 

For example I do this...

index = 0;

elevationView = elevMark.CreateElevation(doc, floorView.Id, index);

 

for different views I give different index, i want to change bounding box based on this index that i get from elevationView

 

Cheers

 

0 Likes
Reply
Accepted solutions (1)
705 Views
2 Replies
Replies (2)

jeremytammik
Autodesk
Autodesk
Accepted solution

Just looking through the help docs, I do not see how to retrieve the index itself.

 

However, you can simply iterate over all indices that make sense and retrieve the view id for each using  the ElevationMarker GetViewId method:

 

http://www.revitapidocs.com/2018.1/a66f506d-5a5f-9a14-5b7b-aacf46c8f08d.htm

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Anonymous
Not applicable

Thanx Jeremy,

I just refactored my code and it achieved the same. I added the algorithm that modified the bounding box for the view and the index selector in the same block of code that creates the elevation view. I had to sleep on it.

 

0 Likes