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: 

Scale View to Fit Sheet

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
1030 Views, 1 Reply

Scale View to Fit Sheet

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.

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: Anonymous

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

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

Post to forums  

Rail Community


Autodesk Design & Make Report