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: 

Creating a picture of a door type without adding a door instance to a project

2 REPLIES 2
Reply
Message 1 of 3
snertillari
333 Views, 2 Replies

Creating a picture of a door type without adding a door instance to a project

Hello everyone

I am writing a Revit Add-In in Revit API 2015.  It has a dialog that shows pictures of door types.  The way I create a picture is like this:

1. I create a wall in the project and put a door instance in the wall.

2. I get the geometry of the door by calling the get_Geometry method of the FamilyInstance class for the door instance

3. When I have retrieved the geometry I delete the wall instance and the door instance because I don't want them in the project.

4. I then create a picture of the door as seen from above using the data in the GeometryElement object that I got from the door instance.

 

There is an Add-In in the Revit SDK Samples folder that does this same thing.  It is called DoorSwing.

 

What I want is to get a overhead picture of a door type without creating an actual door instance in the project.  Does anybody have an idea on how this could be done?

 

Greetings Ari

2 REPLIES 2
Message 2 of 3
Joe.Ye
in reply to: snertillari


Hello,

Revit type parent class ElementType provides GetPreViewImage() method to retrieve the type's image.
Hope this method helps you.


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 3
snertillari
in reply to: Joe.Ye

Not what I was looking for but thanks anyway.  What I want is an overhead picture of a door.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community