- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm still working on this weird wall issue. I think people would understand my issue better if I did it in the UI, then showed you the pictures. Then we can figure out how to do this in the API's.
Main objective: How can I access (via API's) all the associated geometry of a wall with many components inside it? More importantly, how can I get the parents of an object, if I have the ElementID number of a sub-element?
I have a client with several walls containing odd geometry. I need a way to get the script to identify these oddballs. I've been using Try-catch for now, but it's slow.
I want to hide the geometry that isn't the oddball low-wall. I've tried to do this in the UI and API's, but it appears I cannot. The main wall appears to be the "parent" and if the main wall hides, then all the sub-elements are hidden. See images:
Here's the wall. It has a top and bottom element. When I select it, it selects the whole wall.
If I want to select the low wall, I have to use the "select by ID" feature.
I can hide this part of the wall using the UI.
The main wall stays shown (or in the Revit vernacular, "Unhidden").
Here's the sub-wall in the hidden space.
I can unhide this sub-wall in the hide space.
I can select the main wall....
I can hide the main wall, and it hides everything in the wall.
Hidden.
Here's the entire wall in Hidden Space.
I use the "select by ID" feature to select the sub-wall in Hidden Space....
And when I "unhide" (show) the object, it stays hidden.
So, my problem is, I can write a script that hides all the walls. And when I use "UnhideElements" method, the sub-walls do not unhide, because they are in the sub-group of the main wall that is hidden.
How can I use the API's to retrieve all the sub-walls in my wall? Then I can make a subroutine that will show the parent wall, and hide all the sub-walls except the one I want to see.
How can I use my sub-wall's ID number to find the parent wall? I have the sub-wall element ID. How can I use that to find the parents of an object?
thanks,
Solved! Go to Solution.