<?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: Elevation view - determine if family is visible in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5381373#M75219</link>
    <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;your comment about this routine unlikely to&amp;nbsp;be useful to others surprises me. I have come across various items on your blog about determining if items are visible or not in a view. With the possibility of an item being hidden, its category being hidden, it's workset not open, the workset in a linked item not being open, or the item simply hidden in part or fully behind another item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With all these possibilities&amp;nbsp;it becomes almost impossible to be certain of whether an item actually results in some part of that item&amp;nbsp;being "drawn" in the view. Clearly this is handled by Revit whenever it "draws" a view. A simple (on the face of it) routine such as "IsDrawnInView" would be helpful in tagging routines and would probably have other uses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At present I do not think any of the proposed solutions would correctly identify if an item is or is not visible.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Nov 2014 00:17:02 GMT</pubDate>
    <dc:creator>aricke59</dc:creator>
    <dc:date>2014-11-05T00:17:02Z</dc:date>
    <item>
      <title>Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5360113#M75212</link>
      <description>&lt;P&gt;I am trying to automate tagging of families in elevation views and have it&amp;nbsp;all working correctly&amp;nbsp;except for the fact that items hidden by a wall ( or some other item) are also tagged. Because the item is visible in wire frame mode the geometry can be retrieved and therefore I cannot determine if the&amp;nbsp;family is visible in the view and therefore whether the item should be tagged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way of determining if the item is visible and therefore should be tagged?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also looked at the Custom Exporter - IExportContext however this only works for 3D views.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Heopfully there is some really simple option I am missing.&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/135553i7278561CA2F2459C/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" align="center" title="Book Case behind wall" alt="Book Case behind wall" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Oct 2014 00:03:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5360113#M75212</guid>
      <dc:creator>aricke59</dc:creator>
      <dc:date>2014-10-25T00:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5376415#M75213</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revit didn't&amp;nbsp; expose the straightforward&amp;nbsp;API to check if an object is&amp;nbsp;in the back of&amp;nbsp;another element in a given view.&lt;/P&gt;
&lt;P&gt;Fortunately, Revit exposed the ReferenceIntersector class to analysis the elements' spatial relationship. &lt;SPAN&gt;ReferenceIntersector&lt;SPAN class="languageSpecificText"&gt;&lt;SPAN class="cs"&gt;.&lt;/SPAN&gt;&lt;SPAN class="vb"&gt;.&lt;/SPAN&gt;&lt;SPAN class="cpp"&gt;::&lt;/SPAN&gt;&lt;SPAN class="nu"&gt;.&lt;/SPAN&gt;&lt;SPAN class="fs"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;Find&lt;/SPAN&gt;() method can&lt;/P&gt;
&lt;DIV class="summary"&gt;project a ray from the origin along the given direction, and returns all references from intersected elements which match the ReferenceIntersector’s criteria.&lt;/DIV&gt;
&lt;DIV class="summary"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="summary"&gt;So you can use Find() method , set the origin to the family's location, and direction is from the family instance to the view's direction to get if walls in the ray.&lt;/DIV&gt;
&lt;DIV class="summary"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="summary"&gt;Hope this helps.&lt;/DIV&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>Mon, 03 Nov 2014 08:35:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5376415#M75213</guid>
      <dc:creator>Joe.Ye</dc:creator>
      <dc:date>2014-11-03T08:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5376877#M75214</link>
      <description>&lt;P&gt;Dear Aricke,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just discovered that you already submitted the same issue to ADN in case&amp;nbsp;&lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;10128426&lt;/SPAN&gt; [Elevations - Determine if an item is hidden by other items - Advice required].&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;When you submit issues repeatedly and there is a chance that an ADN advisor might answer, please let us know of the other related cases. That will save us effort and enable us to provide better support to&amp;nbsp;you and other developers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my previous answer to the related case, for others to see as well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Revit API offers several powerful methods to determine occlusion of objects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The two that spring to mind are the ray tracing and extrusion analysis functionality provided by the ReferenceIntersector and ExtrusionAnalyzer classes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ReferenceIntersector -- &lt;A href="http://lmgtfy.com/?q=revit+api+ReferenceIntersector" target="_blank"&gt;http://lmgtfy.com/?q=revit+api+ReferenceIntersector&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ExtrusionAnalyzer -- &lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.29" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.29&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shadow Calculation -- &lt;A href="http://thebuildingcoder.typepad.com/blog/2013/06/sun-direction-shadow-calculation-and-wizard-update.html#3" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2013/06/sun-direction-shadow-calculation-and-wizard-update.html#3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Mon, 03 Nov 2014 12:53:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5376877#M75214</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-11-03T12:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5378585#M75215</link>
      <description>Hi Jeremy,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sorry for the doubling up of requests. I didn't get much response to the&lt;BR /&gt;request on the forum so used the more direct ADN approach which was handled&lt;BR /&gt;much faster.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It does still strike me as curious that there is no simple property / method&lt;BR /&gt;that reports on whether an item displays any geometry in a view.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The referenceintersector relies on a 3D view which is really not useful when&lt;BR /&gt;dealing with a 2D view. Duplicating the 2D view to 3D with all the&lt;BR /&gt;visibility override possibilities is likely to display / not display things&lt;BR /&gt;that should be shown / not shown. Certainly transferring all the vis&lt;BR /&gt;settings correctly is likely to require a great deal of coding.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The extrusion analyser and shadow calculation approaches would also fail for&lt;BR /&gt;families that often do not have 3D geometry, eg. A Nurse call button, gas&lt;BR /&gt;outlets, power outlets. These items are quite visible in an elevation but&lt;BR /&gt;without 3D geometry the two methods would fail. These items could also be&lt;BR /&gt;mounted on a desk (furniture) modesty panel. I haven't tried it, however&lt;BR /&gt;with the way furniture is handled I would have some doubts about the&lt;BR /&gt;referenceintersector hitting the geometry of the desk correctly. The power&lt;BR /&gt;outlet may actually be enclosed within the furniture bounding box yet may be&lt;BR /&gt;visible or hidden by the modesty panel.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Perhaps something for the API wishlist.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again for your assistance.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Andreas Ricke - Director&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ARSS-Logo-Full-email&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ARSoftwareSolutions&lt;BR /&gt;&lt;BR /&gt;45 Stirling Rd Croydon Vic 3136&lt;BR /&gt;&lt;BR /&gt;E: mailto:info@arsoftwaresolutions.com.au| T: +6 13 9724 9341 | M:&lt;BR /&gt;0421214274 | W: &lt;A target="_blank" href="http://www.arsoftwaresolutions.com.au"&gt;www.arsoftwaresolutions.com.au&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Nov 2014 22:24:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5378585#M75215</guid>
      <dc:creator>aricke59</dc:creator>
      <dc:date>2014-11-03T22:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5379125#M75216</link>
      <description />
      <pubDate>Tue, 04 Nov 2014 07:54:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5379125#M75216</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T07:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5379137#M75217</link>
      <description>&lt;P&gt;Dear Andreas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No problem at all. I was just wondering a bit where I recently heard or saw something similar and then it took a little while to hunt down. Sorry for my terrible memory &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please feel free to formulate a wishlist item for the 2D occlusion determination and submit a new case for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I would imagine that if you reduce it to 2D, it has so little to do with reality and there is so much left open to interpretation that it would end up being easier toimplement it yourself than even just try to formulate exactly what it is you need in a way that would also make it useful for others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the 2D case, all you need to do is collect lines, determine which ones you consider are hiding which others, and see whether a straight line can be drawn from A to B without hitting any obscuring line in between.&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;</description>
      <pubDate>Tue, 04 Nov 2014 07:57:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5379137#M75217</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2014-11-04T07:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5379411#M75218</link>
      <description>&lt;P&gt;If you only wanted to handle the case of items obscured by a wall found in the view you could grab the location line of the wall and use it to create a vertical plane. With that plane you could implement a signed point distance to plane method&amp;nbsp;to test each element for its location&amp;nbsp;in front of or behind the wall.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Signed point distance to plane is one of my most used methods, it is quite useful for sorting lists of points relative to an arbitrary axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my implementation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static Double SignedPointDistanceToPlane(XYZ point, Plane plane)
{
    return point.Subtract(plane.Origin).DotProduct(plane.Normal);
}&lt;/PRE&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>Tue, 04 Nov 2014 10:54:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5379411#M75218</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T10:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5381373#M75219</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;your comment about this routine unlikely to&amp;nbsp;be useful to others surprises me. I have come across various items on your blog about determining if items are visible or not in a view. With the possibility of an item being hidden, its category being hidden, it's workset not open, the workset in a linked item not being open, or the item simply hidden in part or fully behind another item.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With all these possibilities&amp;nbsp;it becomes almost impossible to be certain of whether an item actually results in some part of that item&amp;nbsp;being "drawn" in the view. Clearly this is handled by Revit whenever it "draws" a view. A simple (on the face of it) routine such as "IsDrawnInView" would be helpful in tagging routines and would probably have other uses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At present I do not think any of the proposed solutions would correctly identify if an item is or is not visible.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 00:17:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5381373#M75219</guid>
      <dc:creator>aricke59</dc:creator>
      <dc:date>2014-11-05T00:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Elevation view - determine if family is visible</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5381377#M75220</link>
      <description>Thanks Scott, I love the succinct function you use. I have to admit my understanding of matrices disappeared quite some time ago. I would love to see Revit / Autodesk provide a good reference on manipulating points and planes. Does anyone have a good reference for such operations?</description>
      <pubDate>Wed, 05 Nov 2014 00:21:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/elevation-view-determine-if-family-is-visible/m-p/5381377#M75220</guid>
      <dc:creator>aricke59</dc:creator>
      <dc:date>2014-11-05T00:21:55Z</dc:date>
    </item>
  </channel>
</rss>

