Has anyone created a Class Hierarchy map of Revit classes?

Has anyone created a Class Hierarchy map of Revit classes?

chowrenovations
Explorer Explorer
369 Views
1 Reply
Message 1 of 2

Has anyone created a Class Hierarchy map of Revit classes?

chowrenovations
Explorer
Explorer

Revit is basically an object-oriented environment using a common architecture known as a Model-View-Controller. When I teach Revit to my high school students, it is not just a how-to-use-it class or even as part of Design Thinking lessons, but rather also as an example of how to create a large scale object oriented program. It would be useful to have a complete Class structure map, showing the superclasses, classes, subclasses structure of the program. For instance, is a Sheet a subclass of a View or a top level class of its own? Thanks.

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

RPTHOMAS108
Mentor
Mentor
Accepted solution

I've seen such a thing requested a couple of time over the years. Mostly the problem is the size of the thing i.e. there are too many levels of class nowadays for it to be instantly useful (not concise enough). Where you do see these things such as in MS Office it is usually because they perhaps have fewer class objects or you can cut it down to the few most used ones. I recall someone at some point creating their own one but it is probably out of date now. You can probably use reflection to generate one but you would then have to make decisions about where to prune it.

 

In most cases start with Element or ElementType and only go deeper if you need specific functionality of a subclass.

 

There is RevitAPI.chm which highlights the inheritance of objects. At the same time Wall has nothing to do with FamilyInstance in terms of usage so why should they need to be seen side by side just to confirm they have no relation higher than Element? You would instead likely start from the specific derived class and see if you can use the base class of that instead i.e. I need to get the location of a Wall I could use Wall class but I'd be using Element for that. I can track back from Wall to Element to see where the functionality I need appears or the other way around.