Scale View to Fit Sheet

Scale View to Fit Sheet

Anonymous
Not applicable
1,168 Views
1 Reply
Message 1 of 2

Scale View to Fit Sheet

Anonymous
Not applicable

I am currently working on an addin (C#) that generates detail sheets (among other things) automatically. I'm nearly complete except for one issue... scaling the view. I understand that Revit was designed natively to discourage this sorta thing but it is necessary in this case. I need to be able to place a single view with the elements in that view zoomed to fit the sheet. 

So far the only idea I have had is to get the two farthest points in the element list and scale based on that distance. I would greatly appreciate any ideas or solutions anyone has even if it is not coding related. I'm sure this has came up throughout the years.

Disclaimer: I very well could be missing something obvious in which case also please feel free to tell me so.

0 Likes
Accepted solutions (1)
1,169 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Can you use the View.Scale property?

 

https://www.revitapidocs.com/2020/b59ad4e0-2835-49be-d1eb-5538f5bc3c89.htm

 



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