Extract PDF of the ceiling views using API from a closed model

Extract PDF of the ceiling views using API from a closed model

josepht21
Enthusiast Enthusiast
453 Views
1 Reply
Message 1 of 2

Extract PDF of the ceiling views using API from a closed model

josepht21
Enthusiast
Enthusiast

Hi everybody, 

I am still quite new in the API of Revit. I was wondering if there is a way to get a PDF for each view of the Ceiling Views in a model. I also need to do this using a closed model so I don't know if it is even possible to do that. I am using C# in my code. 

 

Thanks in advance

0 Likes
454 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

Welcome to the Revit API!

 

You can export a PDF from any view you like, just as you can manually in the user interface.

 

I suggest that you simply determine the exact steps and views to execute the process manually first.

 

I suppose that the PDF is considered an image, so you would use the Document.ExportImage method:

 

https://www.revitapidocs.com/2021.1/b98a3e71-39fa-bf7a-cb3d-591d8b1fcd93.htm

 

No, no, it is considered printing, isn't it? So you would use Document.Print.

 

In any case, it is eminently doable.

 

However, before trying anything else, though, prepare yourself by working through the getting started material:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

Also please pay attention to what you should do before getting started, e.g., learn Revit (hopefully you already have) and maybe dabble a bit with some basic programming, both generic and .NET.

 

Good luck and have fun!

 

P.S. I have no idea what a 'closed model' might be. A house with no doors or windows? A prison?

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes