<?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 computeReferences? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/computereferences/m-p/4629009#M78335</link>
    <description>&lt;P&gt;So I have written this function to prompt the user to select a face:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Public Function SelectSingleFace() As Face
           
            Dim selectedReference As Reference = _uidoc.Selection.PickObject(ObjectType.Face, "Select Face")
            Dim e As Element = _uidoc.Document.GetElement(selectedReference.ElementId)
            Return (TryCast(e.GetGeometryObjectFromReference(selectedReference), Face))

        End Function&lt;/PRE&gt;&lt;P&gt;Which generally works ok, however the returned face does not compute references. ie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SelectSingleFace&lt;SPAN&gt;.Reference = nothing&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Is there a way to turn on computeReferences prior to calling PickObject?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Nov 2013 10:22:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-11-17T10:22:25Z</dc:date>
    <item>
      <title>computeReferences?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/computereferences/m-p/4629009#M78335</link>
      <description>&lt;P&gt;So I have written this function to prompt the user to select a face:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        Public Function SelectSingleFace() As Face
           
            Dim selectedReference As Reference = _uidoc.Selection.PickObject(ObjectType.Face, "Select Face")
            Dim e As Element = _uidoc.Document.GetElement(selectedReference.ElementId)
            Return (TryCast(e.GetGeometryObjectFromReference(selectedReference), Face))

        End Function&lt;/PRE&gt;&lt;P&gt;Which generally works ok, however the returned face does not compute references. ie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SelectSingleFace&lt;SPAN&gt;.Reference = nothing&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Is there a way to turn on computeReferences prior to calling PickObject?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brett&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Nov 2013 10:22:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/computereferences/m-p/4629009#M78335</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-17T10:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: computeReferences?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/computereferences/m-p/4632851#M78336</link>
      <description>&lt;P&gt;No, not that I am aware of.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can query the picked element for its geometry after the pick completes, and specify compute references in that call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers, Jeremy&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2013 22:17:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/computereferences/m-p/4632851#M78336</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2013-11-18T22:17:46Z</dc:date>
    </item>
  </channel>
</rss>

