Message 1 of 5
Hierarchies from Elements

Not applicable
10-06-2014
08:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm scripting a method to get the hierarchy of a selected elemented in the Revit API. The script below is setup in Python and is currently working with the Revit sample files:
ParamListCategory=elem.GetParameters("Category") ParamValue=ParamListCategory[0].AsValueString() ParamListType=elem.GetParameters("Type") ParamValue=ParamListType[0].AsValueString()
My concern is that this method may not work with all revit projects. Can anyone offer information regarding element hierarchy data as a parameter? In other words, do all Revit files have parameters for Category, Family, Type, etc.? Or are these parameters only accessible as of a certain version of Revit? The reason I ask: I would like to develop a tool which can work on any project, and want to be sure I'm using the best method to extract hierarchy data from an element.
Thanks for any help!