<?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 Access a Wall Sweep from a wall instance from Revit 2015? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5702915#M71818</link>
    <description>cool, looking forward to see the result &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Thu, 02 Jul 2015 02:40:35 GMT</pubDate>
    <dc:creator>Aaron.Lu</dc:creator>
    <dc:date>2015-07-02T02:40:35Z</dc:date>
    <item>
      <title>How to Access a Wall Sweep from a wall instance from Revit 2015?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5691851#M71815</link>
      <description>&lt;P&gt;I'm trying to quantify a list of stacked walls.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I used the filtered ElementCollector there is no problem because I select all an the wall sweeps that are on the project.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;var&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; collector = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;FilteredElementCollector&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;this&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;.Document, view.Id).WhereElementIsNotElementType();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;But if I&amp;nbsp;pick a collection of&amp;nbsp;Stacked walls like this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;UIDocument.Selection.GetElementIds()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only the Stacked walls are selected, with the property GetStackedWallMemberIds() I can access the walls, Is there a way to access the element id of the wall sweeps&amp;nbsp;with a property?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you have a wall sweep you can access the wall with the GetHostIds() Something similar but from the wall object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2015 17:11:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5691851#M71815</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-24T17:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Access a Wall Sweep from a wall instance from Revit 2015?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5694505#M71816</link>
      <description>Dear, &lt;BR /&gt;Seems there is no way to directly get WallSweep from Wall, the only workaround is to filter all WallSweep and use GetHostIds() to check with wall it belongs to.</description>
      <pubDate>Fri, 26 Jun 2015 06:09:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5694505#M71816</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-06-26T06:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Access a Wall Sweep from a wall instance from Revit 2015?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5702201#M71817</link>
      <description>&lt;P&gt;Thanks I thought it could be other way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to test it and see if doesn't slow down.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 17:43:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5702201#M71817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-01T17:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Access a Wall Sweep from a wall instance from Revit 2015?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5702915#M71818</link>
      <description>cool, looking forward to see the result &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 02 Jul 2015 02:40:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5702915#M71818</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-07-02T02:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Access a Wall Sweep from a wall instance from Revit 2015?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5703886#M71819</link>
      <description>&lt;P&gt;I come up with this solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the current selection I gather the Walls and Stacked Walls&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;UIDocument&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; UIDocument&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;UIDocument.Selection.GetElementIds().Select&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ElementId&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Element&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt;(x =&amp;gt; Document.GetElement(x))&lt;/FONT&gt;.Where(x =&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BuiltInCategory&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;[] &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BuiltInCategory&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.OST_Walls,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BuiltInCategory&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.OST_StackedWalls&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;}.Contains((&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;BuiltInCategory&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)x.Category.Id.IntegerValue));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;Next I collect the Walls ids&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;IEnumerable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt; wallIds = currSel.Where(x =&amp;gt; !(x &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;as&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Wall&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;).IsStackedWall).Select&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Element&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt;(x =&amp;gt; x.Id.IntegerValue);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;And Search for the walls contained on the Stacked walls&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;currSel.Where(x =&amp;gt; (x &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;as&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Wall&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;).IsStackedWall).OfType&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Wall&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt;().ToList().ForEach(x =&amp;gt; wallIds = wallIds.Union(x.GetStackedWallMemberIds().Select&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ElementId&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt;(y =&amp;gt; y.IntegerValue)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;Then I select all the Wall Sweeps on the current view with the Filter Element Collector&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;IEnumerable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;WallSweep&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt; wallSweeps&lt;/FONT&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Document&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; doc;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;var&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; collector = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;FilteredElementCollector&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;(doc&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;).OfClass(&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;WallSweep&lt;/FONT&gt;).ToElements();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;IEnumerable&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;lt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Element&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt; selResult = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;from&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; element &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;in&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; collector &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; element;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;wallSweeps&lt;/FONT&gt;= selResult.OfType&amp;lt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;WallSweep&lt;/FONT&gt;&amp;gt;();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And Finally collect the intersected elements&lt;/P&gt;&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;IEnumerable&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Element&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt; wsInSelWalls = wallSweeps.Where(x =&amp;gt; x.GetHostIds().Select&amp;lt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;ElementId&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;int&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&amp;gt;(y =&amp;gt; y.IntegerValue).Intersect(wallIds).Count() &amp;gt; 0);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 16:35:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-access-a-wall-sweep-from-a-wall-instance-from-revit-2015/m-p/5703886#M71819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-02T16:35:03Z</dc:date>
    </item>
  </channel>
</rss>

