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

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

Anonymous
Not applicable
470 Views
2 Replies
Message 1 of 3

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

Anonymous
Not applicable

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

0 Likes
471 Views
2 Replies
Replies (2)
Message 2 of 3

Joe.Ye
Alumni
Alumni

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
0 Likes
Message 3 of 3

Anonymous
Not applicable

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

0 Likes