First Object selection, undefined property categories and internal names
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a few questions:
1. What is the fastest way to select first object items? For now, I've found two solutions, but both are pretty slow. First, very slow, but probably the most precise, is to use combinations of two methods FindFirstGeometry, then FindFirstObjectAncestor. The second is a standard foreach loop with excluding IsLayer, IsModel, IsGeometry and IsCollection items, this one is faster, but probably may miss some results. And also, I found in documentation that FirstObject selection resolution presenting IsLayer children, but I'm not sure if this is really true, because in my files, under the Layers are Categories, not first objects.
2. How to check whether the object even have some property category? Something like when doing manual Find Items, there is a condition options Defined, Undefined.
3. Is there some list of internal property categories and/or property names for Revit files? For example, I found that workset is (this has been checked on 30 different files) lcldrevit_parameter_-1002053. I'm interested in volume, area, length parameters. I also found that area and volume has something stable like workset, but length depends on category in Revit. I'm trying to avoid searching by display name in order to avoid possible mistakes based on different language installations.
Thanks and regards