<?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: ReferenceIntersector.FindNearest does not intersect with Curtain Walls in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824953#M52035</link>
    <description>&lt;P&gt;Yes, you can select the subcomponent by hovering over with the mouse and then pressing tab repeatedly to cycle through items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lookup tool then lists the category as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can also extract the values and names&amp;nbsp;from the BuiltInCategory enum and look for likely items there.&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="Capture0303.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/470444i494EDD91D94A99BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture0303.PNG" alt="Capture0303.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Mar 2018 20:27:24 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2018-03-03T20:27:24Z</dc:date>
    <item>
      <title>ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7818274#M52028</link>
      <description>&lt;P&gt;When I use ReferenceIntersector.FindNearest, it will find a wall, but it doesn't find a curtain wall.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var view3d = RUtils.Get3dView(doc);

ReferenceIntersector refIntersector = new ReferenceIntersector(
        new ElementCategoryFilter(BuiltInCategory.OST_Walls),
        FindReferenceTarget.Element,
        view3d
);

var x = refIntersector.FindNearest(stairBase, baseDirection);&lt;/PRE&gt;&lt;P&gt;and after executing this, the `x` is `null`.&lt;BR /&gt;&lt;BR /&gt;I know the base point and direction are fine because when I change the type of wall in the UI to be, say "Interior - Partition" instead of "SH_Curtain wall" and rerun the code, then it does find it.&amp;nbsp; I expect it to intersect the curtain wall also since using the Revit Lookup tool, the curtain wall has BuiltinCategory of "OST_Walls" (just like the partition wall).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, the function for getting the 3d view is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        public static View3D Get3dView(Document doc, bool createIfNull=true)
        {
            FilteredElementCollector collector = new FilteredElementCollector(doc).OfClass(typeof(View3D));

            foreach (var elem in collector) {
                var view = (View3D) elem;
                if (view.IsTemplate || view.IsPerspective) {
                    continue;
                }

                if (view.IsSectionBoxActive) {
                    var trans = new Transaction(doc);
                    trans.Start("disable section box");
                    view.IsSectionBoxActive = false;
                    doc.Regenerate();
                    trans.Commit();
                
                    return view;
                }
            }

            return createIfNull ? create3dView(doc) : null;
        }&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;How can I have it intersect the curtain wall also?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 05:07:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7818274#M52028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-01T05:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7823859#M52029</link>
      <description>&lt;P&gt;Reference intersector will only work if item is visible in view you use. So you should not be picking at random because view discipline, manual&amp;nbsp;hide, category hide&amp;nbsp;etc. all affect what is visible in an existing view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either create a new view with what you are aiming at visible or use one which you know the visibility settings of. The issue may be something else but it is usually this.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 22:13:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7823859#M52029</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2018-03-02T22:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824139#M52030</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;, that's good to know about creating a new 3D view.&amp;nbsp; I will keep that in mind.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, that appears not to be the issue.&amp;nbsp; I replaced my call to get the 3D view to be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var view3d = RUtils.create3dView(doc);&lt;/PRE&gt;&lt;P&gt;and that function looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static View3D create3dView(Document doc) {
    ViewFamilyType vft = new FilteredElementCollector(doc)
            .OfClass(typeof(ViewFamilyType))
            .Cast&amp;lt;ViewFamilyType&amp;gt;()
            .FirstOrDefault(x =&amp;gt; ViewFamily.ThreeDimensional == x.ViewFamily);
    using (var trans = new Transaction(doc)) {
        trans.Start("Create 3D View");
        var view3D = View3D.CreateIsometric(doc, vft.Id);
        trans.Commit();
        return view3D;
    }
}&lt;/PRE&gt;&lt;P&gt;But it still does not find the curtain wall.&amp;nbsp; I've also confirmed the curtain wall is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've drawn a model line for debugging purposes to show the line from the intersection (or no line if no intersection is found).&amp;nbsp; If I keep the wall as "Interior - Partition", then it intersects it (see attachment).&amp;nbsp; If curtain wall, it does not intersect...&lt;BR /&gt;&lt;BR /&gt;Any other ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 02:46:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824139#M52030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-03T02:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824142#M52031</link>
      <description>&lt;P&gt;In case it's helpful, here's another example of the result. Notice it goes straight through the curtain wall, but stops at the wall.&amp;nbsp; This is the sample project that ships with Revit 2018.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 02:50:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824142#M52031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-03T02:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824419#M52032</link>
      <description>&lt;P&gt;hi, try to replace:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var x = refIntersector.FindNearest(stairBase, baseDirection);&lt;/PRE&gt;&lt;P&gt;with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ReferenceWithContext x = refIntersector.FindNearest(stairBase, baseDirection);&lt;/PRE&gt;&lt;P&gt;FindNearest Method:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.revitapidocs.com/2017.1/866e1f2b-c79a-4d9f-1db1-9e386dd42941.htm" target="_blank"&gt;http://www.revitapidocs.com/2017.1/866e1f2b-c79a-4d9f-1db1-9e386dd42941.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm not sure if this helps, is this a code snippet?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will help to post your code completely where things might go wrong.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 10:34:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824419#M52032</guid>
      <dc:creator>so-chong</dc:creator>
      <dc:date>2018-03-03T10:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824499#M52033</link>
      <description>&lt;P&gt;Perhaps you need to use a logical&amp;nbsp;or filter for the component categories of the curtain wall element&amp;nbsp;i.e.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OST_CurtainWallPanels&lt;/P&gt;&lt;P&gt;OST_CurtainWallMullions&lt;/P&gt;&lt;P&gt;OST_Walls (Also include normal wall category for other non curtain walls)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you select the wall it highlights the wall container which then has visible geometry&amp;nbsp;reported to the lookup tool. Ordinarily geometry&amp;nbsp;is invisible, so there is no geometry to find in the OST_Walls element. This is my theory.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 12:15:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824499#M52033</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2018-03-03T12:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824932#M52034</link>
      <description>&lt;P&gt;Awesome, including `OST_CurtainWallPanels` and `OST_CurtainWallMullions` indeed solved it.&amp;nbsp; Thanks!&lt;BR /&gt;&lt;BR /&gt;I'm wondering how, in the future, I'll be able to know the relevant component categories, so I can answer my own question next time.&amp;nbsp; I think I can do it with Loadable Families since I can edit the family and see its different components, but for a system family like walls I don't know how to do that.&amp;nbsp; Is there a way to see the component categories?&amp;nbsp; Somewhere in the Revit Lookup tool perhaps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1263196"&gt;@so-chong&lt;/a&gt;, thanks for your answer also.&amp;nbsp; I don't think that was the issue.&amp;nbsp; Since FindNearest already returns a ReferenceWithContext object, I reckon leaving it as `var` is equivalent to explicitly declaring the type.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 20:04:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824932#M52034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-03T20:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824953#M52035</link>
      <description>&lt;P&gt;Yes, you can select the subcomponent by hovering over with the mouse and then pressing tab repeatedly to cycle through items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lookup tool then lists the category as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can also extract the values and names&amp;nbsp;from the BuiltInCategory enum and look for likely items there.&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="Capture0303.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/470444i494EDD91D94A99BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture0303.PNG" alt="Capture0303.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 20:27:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824953#M52035</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2018-03-03T20:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceIntersector.FindNearest does not intersect with Curtain Walls</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824956#M52036</link>
      <description>&lt;P&gt;Awesome, thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 20:30:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/referenceintersector-findnearest-does-not-intersect-with-curtain/m-p/7824956#M52036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-03T20:30:35Z</dc:date>
    </item>
  </channel>
</rss>

