<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get the parent of an attached Wall sub-element in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8318511#M47113</link>
    <description>&lt;P&gt;your "odd-ball"wall is a stacked wall.&lt;/P&gt;&lt;P&gt;for the parent wall:&lt;/P&gt;&lt;PRE&gt;			//check if wall is a stackedwall
			wall.IsStackedWall;
			// get all the member walls
			wall.GetStackedWallMemberIds();&lt;/PRE&gt;&lt;P&gt;for a memberwall:&lt;/P&gt;&lt;PRE&gt;			// check if wall is member of a stackedwall
			wall.IsStackedWallMember;
			// get "parent" wall
			wall.StackedWallOwnerId;&lt;/PRE&gt;</description>
    <pubDate>Sun, 07 Oct 2018 22:08:17 GMT</pubDate>
    <dc:creator>FAIR59</dc:creator>
    <dc:date>2018-10-07T22:08:17Z</dc:date>
    <item>
      <title>How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8316353#M47111</link>
      <description>&lt;P&gt;I'm still working on this weird wall issue.&amp;nbsp; I think people would understand my issue better if I did it in the UI, then showed you the pictures.&amp;nbsp; Then we can figure out how to do this in the API's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Main objective: How can I access (via API's) all the associated geometry of a wall with many components inside it?&amp;nbsp; More importantly, &lt;STRONG&gt;how can I get the parents of an object, if I have the ElementID number of a sub-element?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a client with several walls containing odd geometry.&amp;nbsp; I need a way to get the script to identify these oddballs.&amp;nbsp; I've been using Try-catch for now, but it's slow.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to hide the geometry that isn't the oddball low-wall.&amp;nbsp; I've tried to do this in the UI and API's, but it appears I cannot.&amp;nbsp; The main wall appears to be the "parent" and if the main wall hides, then all the sub-elements are hidden.&amp;nbsp; See images:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Here's the wall.  It has a top and bottom element.  When I select it, it selects the whole wall." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554454i656310AD4EA14BA4/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-1.jpg" alt="Here's the wall.  It has a top and bottom element.  When I select it, it selects the whole wall." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Here's the wall.  It has a top and bottom element.  When I select it, it selects the whole wall.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="If I want to select the low wall, I have to use the &amp;quot;select by ID&amp;quot; feature." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554456iFA4F23BAE1FBDCF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-2.jpg" alt="If I want to select the low wall, I have to use the &amp;quot;select by ID&amp;quot; feature." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;If I want to select the low wall, I have to use the "select by ID" feature.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="I can hide this part of the wall using the UI." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554458i7DEAD9324636997E/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-4.jpg" alt="I can hide this part of the wall using the UI." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;I can hide this part of the wall using the UI.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The main wall stays shown (or in the Revit vernacular, &amp;quot;Unhidden&amp;quot;)." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554459i5A4CF9523C0A3C33/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-5.jpg" alt="The main wall stays shown (or in the Revit vernacular, &amp;quot;Unhidden&amp;quot;)." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The main wall stays shown (or in the Revit vernacular, "Unhidden").&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Here's the sub-wall in the hidden space." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554460i26FE9E5E0E095875/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-6.jpg" alt="Here's the sub-wall in the hidden space." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Here's the sub-wall in the hidden space.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="I can unhide this sub-wall in the hide space." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554461i18C14C6CE7B89775/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-7.jpg" alt="I can unhide this sub-wall in the hide space." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;I can unhide this sub-wall in the hide space.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="I can select the main wall...." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554462iD7CB362AF0149E92/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-8.jpg" alt="I can select the main wall...." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;I can select the main wall....&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="I can hide the main wall, and it hides everything in the wall." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554463i92C0E76E4FECC68F/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-9.jpg" alt="I can hide the main wall, and it hides everything in the wall." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;I can hide the main wall, and it hides everything in the wall.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hidden." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554464i4FCA3C0599DBEF74/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-10.jpg" alt="Hidden." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Hidden.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Here's the entire wall in Hidden Space." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554466iB2E37B01A1603034/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-11.jpg" alt="Here's the entire wall in Hidden Space." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Here's the entire wall in Hidden Space.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="I use the &amp;quot;select by ID&amp;quot; feature to select the sub-wall in Hidden Space...." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554467iC61F4EEADEBF645A/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-12.jpg" alt="I use the &amp;quot;select by ID&amp;quot; feature to select the sub-wall in Hidden Space...." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;I use the "select by ID" feature to select the sub-wall in Hidden Space....&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="And when I &amp;quot;unhide&amp;quot;  (show) the object, it stays hidden." style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/554468iD23C6EC967F3AD45/image-size/large?v=v2&amp;amp;px=999" role="button" title="20181005_Untitled-13.jpg" alt="And when I &amp;quot;unhide&amp;quot;  (show) the object, it stays hidden." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;And when I "unhide"  (show) the object, it stays hidden.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So, my problem is, I can write a script that hides all the walls.&amp;nbsp; 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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I use the API's to retrieve all the sub-walls in my wall?&amp;nbsp;&lt;/STRONG&gt; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I use my sub-wall's ID number to find the parent wall?&amp;nbsp;&lt;/STRONG&gt; I have the sub-wall element ID.&amp;nbsp; How can I use that to find the parents of an object?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 18:56:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8316353#M47111</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-10-05T18:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8317283#M47112</link>
      <description>&lt;P&gt;I can imagine several different approaches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried retrieving all wall elements&amp;nbsp;intersecting one of the walls'&amp;nbsp; bounding box?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you compared the different walls' location lines? Are they possibly identical? Or, identical except for the Z component? Or just parallel and pretty close to each other?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your question is ambiguous; at&amp;nbsp;the beginning, you say you want to retrieve the parent wall; at the end, you say you want to retrieve all the sub-walls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Oct 2018 14:58:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8317283#M47112</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-10-06T14:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8318511#M47113</link>
      <description>&lt;P&gt;your "odd-ball"wall is a stacked wall.&lt;/P&gt;&lt;P&gt;for the parent wall:&lt;/P&gt;&lt;PRE&gt;			//check if wall is a stackedwall
			wall.IsStackedWall;
			// get all the member walls
			wall.GetStackedWallMemberIds();&lt;/PRE&gt;&lt;P&gt;for a memberwall:&lt;/P&gt;&lt;PRE&gt;			// check if wall is member of a stackedwall
			wall.IsStackedWallMember;
			// get "parent" wall
			wall.StackedWallOwnerId;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Oct 2018 22:08:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8318511#M47113</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-10-07T22:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8320365#M47114</link>
      <description>&lt;P&gt;Brilliant answer.&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 17:12:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8320365#M47114</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-10-08T17:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8320975#M47115</link>
      <description>&lt;P&gt;Thanks again for your post.&amp;nbsp; It solved my problem and I am able to get the parents without any issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a secondary question.&amp;nbsp; This works when I recast the element into a type "wall."&amp;nbsp; I sometimes have elements that are parts of a greater assembly, but are not just a wall.&amp;nbsp;&lt;STRONG&gt; Is there a method for getting any parent object generically?&amp;nbsp;&lt;/STRONG&gt; I'm used to coding in CATIA, and you can get parents basically regardless of the type declaration.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 21:52:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8320975#M47115</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-10-08T21:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8331696#M47116</link>
      <description>&lt;P&gt;Bump.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone know if&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Is there a method for getting any parent object generically?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 22:57:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8331696#M47116</guid>
      <dc:creator>0001des</dc:creator>
      <dc:date>2018-10-12T22:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the parent of an attached Wall sub-element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8331918#M47117</link>
      <description>&lt;P&gt;The most generic thing I can think of in that direction is the family instance `Host` property:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://apidocs.co/apps/revit/2019/69f30141-bd3b-8bdd-7a63-6353d4d495f9.htm" target="_blank"&gt;https://apidocs.co/apps/revit/2019/69f30141-bd3b-8bdd-7a63-6353d4d495f9.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Much more limited than what you describe, though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something generic such as you describe can be implemented in various ways, e.g., using a filtered element collector using the element geometry or bound box intersection, or by ray tracing analysis to discover adjacency and containment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Details&amp;nbsp;depend on your exact requirements, though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 07:35:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-get-the-parent-of-an-attached-wall-sub-element/m-p/8331918#M47117</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-10-13T07:35:04Z</dc:date>
    </item>
  </channel>
</rss>

